Bully Task (12.12.2005)

at.jku.fim.datalinksimulation.layer1.wire
Interface WireConnector

All Known Implementing Classes:
CRCGuard, Hub, InterlinkingDevice, NetworkStation

public interface WireConnector

Title: OSI Simulation Framework

This interface must be implemented by classes which are interested in data sent on a wire.

Copyright: (c) 2004-05

Company: FIM@JKU, www.fim.uni-linz.ac.at

Version:
$Id: WireConnector.java,v 1.1 2005/10/27 13:10:11 aputzinger Exp $
Author:
Andreas Putzinger

Method Summary
 void bePlugged(Wire wire, int portNr)
          This method should only be called by Wires, which inform this WireConnector that they are connected.
 void beUnplugged(Wire wire, int portNr)
          This method should only be called by Wires, which inform this WireConnector that they are disconnected
 void informAboutDataOnWire(Wire sender, RawData data)
          This method is called whenever a data package is received by a subscribed wire.
 

Method Detail

informAboutDataOnWire

void informAboutDataOnWire(Wire sender,
                           RawData data)
This method is called whenever a data package is received by a subscribed wire.

Parameters:
sender - If the sender is a Wire, sender contains the reference to the wire which received the packet.
data - The received data on the wire

bePlugged

void bePlugged(Wire wire,
               int portNr)
               throws WiringException
This method should only be called by Wires, which inform this WireConnector that they are connected.

Parameters:
wire - Connected wire
Throws:
WiringException - May be thrown to veto against this wiring

beUnplugged

void beUnplugged(Wire wire,
                 int portNr)
                 throws WiringException
This method should only be called by Wires, which inform this WireConnector that they are disconnected

Parameters:
wire - Disconnected wire
Throws:
WiringException - May be thrown on any error or veto

Bully Task (12.12.2005)

Submit a bug

Copyright 2004, 2005 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.