public class TCP_IP_ServerCommunication extends java.lang.Object implements ServerConnectionInterface
TCP/IP-Implementierung des Interfaces ServerConnectionInterface
.
Modifier and Type | Field and Description |
---|---|
protected java.net.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(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()
Erzeugt eine Instanz dieser Klasse.
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(java.net.Socket socket)
public java.lang.String getPlainConnectionName()
de.bsvrz.dav.daf.communication.lowLevel.ServerConnectionInterface
ConnectionInterface
des gleichen Protokolls.getPlainConnectionName
in interface ServerConnectionInterface