public class TCP_IP_ServerCommunication extends Object implements ServerConnectionInterface
ServerConnectionInterface
.Modifier and Type | Field and Description |
---|---|
private static Debug |
_debug
Der Debug-Logger.
|
protected ServerSocket |
_socket
Der Server-Socket des Datenverteilers
|
Constructor and Description |
---|
TCP_IP_ServerCommunication()
Erzeugt eine Instanz dieser Klasse.
|
Modifier and Type | Method and 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(Socket socket) |
ConnectionInterface |
getPlainConnection()
Gibt eine Instanz der Kommunikationsklasse vom Typ
ConnectionInterface des gleichen Protokolls. |
String |
getPlainConnectionName()
Liefert den Klassennamen der Kommunikationsklasse vom Typ
ConnectionInterface des gleichen Protokolls. |
private static final Debug _debug
protected ServerSocket _socket
public TCP_IP_ServerCommunication()
public void connect(int subAdressNumber) throws CommunicationError
de.bsvrz.dav.daf.communication.lowLevel.ServerConnectionInterface
connect
in interface ServerConnectionInterface
subAdressNumber
- die Nummer der SubadresseCommunicationError
- Wenn die Verbindung nicht erfolgreich erzeugt wurde.public void disconnect()
de.bsvrz.dav.daf.communication.lowLevel.ServerConnectionInterface
disconnect
in interface ServerConnectionInterface
public ConnectionInterface accept()
de.bsvrz.dav.daf.communication.lowLevel.ServerConnectionInterface
accept
in interface ServerConnectionInterface
null
, wenn keine Verbindung erzeugt werden konnte.public ConnectionInterface getPlainConnection()
de.bsvrz.dav.daf.communication.lowLevel.ServerConnectionInterface
ConnectionInterface
des gleichen Protokolls.getPlainConnection
in interface ServerConnectionInterface
public ConnectionInterface getConnectionTo(Socket socket)
public String getPlainConnectionName()
de.bsvrz.dav.daf.communication.lowLevel.ServerConnectionInterface
ConnectionInterface
des gleichen Protokolls.getPlainConnectionName
in interface ServerConnectionInterface