ServerConnectionInterfacepublic class TCP_IP_ServerCommunication extends java.lang.Object implements ServerConnectionInterface
ServerConnectionInterface.| Modifier and Type | Field | Description |
|---|---|---|
protected java.net.ServerSocket |
_socket |
Der Server-Socket des Datenverteilers
|
| Constructor | Description |
|---|---|
TCP_IP_ServerCommunication() |
Erzeugt eine Instanz dieser Klasse.
|
| Modifier and Type | Method | Description |
|---|---|---|
ConnectionInterface |
accept() |
Wartet auf eine Verbindungsanfrage eines Clients (passive Verbindung).
|
void |
connect(int subAdressNumber) |
Erstellt eine Verbindung zur lokalen Adresse mit der Nummer der Subadresse.
|
void |
disconnect() |
Schließt die aktuelle Verbindung.
|
ConnectionInterface |
getConnectionTo(java.net.Socket socket) |
|
ConnectionInterface |
getPlainConnection() |
Gibt eine Instanz der Kommunikationsklasse vom Typ
ConnectionInterface des gleichen Protokolls. |
java.lang.String |
getPlainConnectionName() |
Liefert den Klassennamen der Kommunikationsklasse vom Typ
ConnectionInterface des gleichen Protokolls. |
public TCP_IP_ServerCommunication()
public void connect(int subAdressNumber)
throws CommunicationError
ServerConnectionInterfaceconnect in interface ServerConnectionInterfacesubAdressNumber - die Nummer der SubadresseCommunicationError - Wenn die Verbindung nicht erfolgreich erzeugt wurde.public void disconnect()
ServerConnectionInterfacedisconnect in interface ServerConnectionInterfacepublic ConnectionInterface accept()
ServerConnectionInterfaceaccept in interface ServerConnectionInterfacenull, wenn keine Verbindung erzeugt werden konnte.public ConnectionInterface getPlainConnection()
ServerConnectionInterfaceConnectionInterface des gleichen Protokolls.getPlainConnection in interface ServerConnectionInterfacepublic ConnectionInterface getConnectionTo(java.net.Socket socket)
public java.lang.String getPlainConnectionName()
ServerConnectionInterfaceConnectionInterface des gleichen Protokolls.getPlainConnectionName in interface ServerConnectionInterface