public abstract class AbstractDataLinkLayer extends Object implements DataLinkLayer
Modifier and Type | Class and Description |
---|---|
static class |
AbstractDataLinkLayer.Link |
Modifier and Type | Field and Description |
---|---|
private LinkedList<DataLinkLayerListener> |
_dataLinkLayerListeners |
private Debug |
_debug |
private int |
_localAddress |
private Properties |
_properties |
private Object |
_propertiesSync |
Constructor and Description |
---|
AbstractDataLinkLayer() |
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(DataLinkLayerListener dataLinkLayerListener) |
protected boolean |
allowConnection(List<AbstractDataLinkLayer.Link> links)
Überprüft ob eine Verbindung erlaubt ist.
|
protected boolean |
allowConnection(List<AbstractDataLinkLayer.Link> links,
Properties properties)
Überprüft ob eine Verbindung erlaubt ist.
|
protected void |
checkConnection(List<AbstractDataLinkLayer.Link> links,
Properties properties)
Überprüft, ob die Verbindung zulässig ist.
|
protected abstract String |
getDefaultProperty(String name) |
int |
getLocalAddress()
Bestimmt die OSI2-Adresse bzw.
|
String |
getProperty(String name)
Bestimmt den Wert eines bestimmten Protokoll-Parameters.
|
protected void |
notifyEvent(DataLinkLayer.Link link,
DataLinkLayerEvent.Type type,
Object data) |
protected void |
notifyEvent(DataLinkLayerEvent event) |
void |
removeEventListener(DataLinkLayerListener dataLinkLayerListener) |
void |
setLocalAddress(int port)
Setzt die OSI2-Adresse bzw.
|
void |
setProperties(Properties properties)
Setzt einen neuen Satz von Protokoll-Parametern.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
abort, createLink, getMaximumDataSize, isStarted, setDavConnection, shutdown, start
private final LinkedList<DataLinkLayerListener> _dataLinkLayerListeners
private int _localAddress
private Properties _properties
private final Object _propertiesSync
private final Debug _debug
public String getProperty(String name)
DataLinkLayer
getProperty
in interface DataLinkLayer
name
- Name des Protokoll-Parameters.public void setProperties(Properties properties)
DataLinkLayer
setProperties
in interface DataLinkLayer
properties
- Neue Verbindungsparameter.DataLinkLayer.Link.getProperty(java.lang.String)
public final void addEventListener(DataLinkLayerListener dataLinkLayerListener)
addEventListener
in interface DataLinkLayer
public final void removeEventListener(DataLinkLayerListener dataLinkLayerListener)
removeEventListener
in interface DataLinkLayer
protected final void notifyEvent(DataLinkLayerEvent event)
protected final void notifyEvent(DataLinkLayer.Link link, DataLinkLayerEvent.Type type, Object data)
public void setLocalAddress(int port)
DataLinkLayer
setLocalAddress
in interface DataLinkLayer
port
- Eigene OSI2-Adresse bzw. Portnummer.public int getLocalAddress()
DataLinkLayer
getLocalAddress
in interface DataLinkLayer
protected void checkConnection(List<AbstractDataLinkLayer.Link> links, Properties properties)
links
- Liste mit allen Links/Verbindungenproperties
- Neue Propertiesprotected boolean allowConnection(List<AbstractDataLinkLayer.Link> links)
links
- Liste mit allen Verbindungentrue
: Die Verbindung darf aufgebaut werden.false
: Es darf kein Telegram Austausch stattfinden.protected boolean allowConnection(List<AbstractDataLinkLayer.Link> links, Properties properties)
links
- Liste mit allen Verbindungenproperties
- Neue Einstellungentrue
: Die Verbindung darf aufgebaut werden.false
: Es darf kein Telegram Austausch stattfinden.