public class T_A_HighLevelCommunication extends java.lang.Object implements T_A_HighLevelCommunicationInterface, de.bsvrz.dav.daf.communication.lowLevel.HighLevelCommunicationCallbackInterface
Constructor and Description |
---|
T_A_HighLevelCommunication(ServerConnectionProperties properties,
HighLevelApplicationManager applicationManager,
LowLevelConnectionsManagerInterface lowLevelConnectionsManager,
boolean waitForConfiguration)
Erzeugt ein neues Objekt mit den gegebenen Parametern.
|
Modifier and Type | Method and Description |
---|---|
void |
continueAuthentication()
Diese Methode wird von der Verbindungsverwaltung aufgerufen, sobald die Konfiguration vorhanden ist, um zu signalisieren, dass eine blockierte
Authentifizierung weiter bearbeitet werden kann: Steht eine Authentifizierungsschlüsselanfrage an, während die Konfiguration noch nicht vorhanden ist, wird
die Antwort blockiert bis die Konfiguration bereit ist.
|
void |
disconnected(boolean error,
java.lang.String message) |
java.lang.String |
getApplicationName()
Gibt den Namen der Applikation zurück.
|
java.lang.String |
getApplicationTypePid()
Gibt den Typ der Applikation zurück.
|
long |
getConfigurationId()
Gibt die Id der Konfiguration zurück.
|
long |
getConnectionCreatedTime()
Zeitpunkt, an dem das Objekt erstellt wurde und somit eine Verbindung zum DaV bestand.
|
long |
getId()
Diese Methode wird von der Verbindungsverwaltung aufgerufen, um die ID der verbundenen Applikation zu erhalten.
|
java.lang.String |
getSendBufferState()
Liefert einen beschreibenden Text mit dem Zustand des Sendepuffers aus der LowLevelCommunication.
|
long |
getTelegramTime(long maxWaitingTime)
Diese Methode wird von der Verbindungsverwaltung aufgerufen.
|
de.bsvrz.dav.daf.communication.protocol.UserLogin |
getUserLogin()
Gibt die ID des verbundenen Benutzers zurück.
|
boolean |
isConfiguration()
Gibt zurück, ob es sich um die Konfiguration handelt.
|
void |
sendData(de.bsvrz.dav.daf.communication.lowLevel.telegrams.ApplicationDataTelegram telegram) |
void |
sendData(de.bsvrz.dav.daf.communication.lowLevel.telegrams.ApplicationDataTelegram[] telegrams) |
void |
sendData(de.bsvrz.dav.daf.communication.lowLevel.telegrams.ApplicationDataTelegram telegram,
boolean toCentralDistributor)
Versendet ein Daten-Telegramm über diese Verbindung
|
void |
setUserLogin(de.bsvrz.dav.daf.communication.protocol.UserLogin userLogin)
Setzt den eingeloggten Benutzer (nur für Testzwecke)
|
void |
terminate(boolean error,
java.lang.String message)
Terminiert die Kommunikationsverbindung.
|
void |
terminate(boolean error,
java.lang.String message,
de.bsvrz.dav.daf.communication.lowLevel.telegrams.DataTelegram terminationTelegram) |
java.lang.String |
toString() |
void |
triggerSender(de.bsvrz.dav.daf.communication.lowLevel.telegrams.BaseSubscriptionInfo data,
byte state)
Diese Methode wird von der Verbindungsverwaltung aufgerufen, um eine Sendesteuerung an die Applikation weiterzuleiten.
|
void |
update(de.bsvrz.dav.daf.communication.lowLevel.telegrams.DataTelegram telegram) |
void |
updateConfigData(de.bsvrz.dav.daf.communication.dataRepresentation.datavalue.SendDataObject receivedData) |
public T_A_HighLevelCommunication(ServerConnectionProperties properties, HighLevelApplicationManager applicationManager, LowLevelConnectionsManagerInterface lowLevelConnectionsManager, boolean waitForConfiguration)
properties
- stellt die Parameter einer Verbindung zwischen zwei ServernlowLevelConnectionsManager
- waitForConfiguration
- true: ,false:public final long getTelegramTime(long maxWaitingTime) throws de.bsvrz.dav.daf.main.CommunicationError
ServerHighLevelCommunication
TelegramTimeRequest
wird erzeugt und zur Applikation gesendet. Danach
wird auf die Antwort TelegramTimeAnswer
gewartet. Wenn die Antwort nicht innerhalb der angegebenen
maximalen Wartezeit angekommen ist, wird eine Ausnahme
erzeugt.getTelegramTime
in interface ServerHighLevelCommunication
maxWaitingTime
- Maximale Zeit, die auf eine Antwort gewartet wird.-1
, wenn nicht innnerhalb der maximalen Wartezeit eine Antwort empfangen wurde.de.bsvrz.dav.daf.main.CommunicationError
- Wenn bei der initialen Kommunikation mit dem Datenverteiler Fehler aufgetreten sind.public final void sendData(de.bsvrz.dav.daf.communication.lowLevel.telegrams.ApplicationDataTelegram telegram, boolean toCentralDistributor)
CommunicationInterface
sendData
in interface CommunicationInterface
telegram
- TelegrammtoCentralDistributor
- true: In Richtung des Zentraldatenverteilers, beim Sender-Senke-Datenfluss.
false: Aus Richtung des Zentraldatenverteilers, beim Quelle-Empfänger-Datenfluss.public final void sendData(de.bsvrz.dav.daf.communication.lowLevel.telegrams.ApplicationDataTelegram telegram)
public final void sendData(de.bsvrz.dav.daf.communication.lowLevel.telegrams.ApplicationDataTelegram[] telegrams)
public final void terminate(boolean error, java.lang.String message)
ServerHighLevelCommunication
terminate
in interface ServerHighLevelCommunication
error
- Ist true
, wenn die Verbindung im Fehlerfall abgebrochen werden soll, ohne die noch gepufferten Telegramme zu versenden;
false
, wenn versucht werden soll alle gepufferten Telegramme zu versenden.message
- Fehlermeldung, die die Fehlersituation näher beschreibt.public long getConnectionCreatedTime()
public java.lang.String getSendBufferState()
LowLevelCommunicationInterface.getSendBufferState()
public final void terminate(boolean error, java.lang.String message, de.bsvrz.dav.daf.communication.lowLevel.telegrams.DataTelegram terminationTelegram)
public void disconnected(boolean error, java.lang.String message)
disconnected
in interface de.bsvrz.dav.daf.communication.lowLevel.HighLevelCommunicationCallbackInterface
public void updateConfigData(de.bsvrz.dav.daf.communication.dataRepresentation.datavalue.SendDataObject receivedData)
updateConfigData
in interface de.bsvrz.dav.daf.communication.lowLevel.HighLevelCommunicationCallbackInterface
public final void triggerSender(de.bsvrz.dav.daf.communication.lowLevel.telegrams.BaseSubscriptionInfo data, byte state)
ApplicationCommunicationInterface
RequestSenderDataTelegram
-Array gebildet und über die Telegrammverwaltung an die Applikation gesendet.triggerSender
in interface ApplicationCommunicationInterface
data
- Anmeldeinformationenstate
- BenachrichtigungscodeRequestSenderDataTelegram
public final long getId()
ServerHighLevelCommunication
getId
in interface ServerHighLevelCommunication
getId
in interface CommunicationInterface
public final de.bsvrz.dav.daf.communication.protocol.UserLogin getUserLogin()
ServerHighLevelCommunication
getUserLogin
in interface ServerHighLevelCommunication
getUserLogin
in interface CommunicationInterface
public void setUserLogin(de.bsvrz.dav.daf.communication.protocol.UserLogin userLogin)
userLogin
- Benutzerpublic final long getConfigurationId()
T_A_HighLevelCommunicationInterface
getConfigurationId
in interface T_A_HighLevelCommunicationInterface
public final java.lang.String getApplicationTypePid()
T_A_HighLevelCommunicationInterface
getApplicationTypePid
in interface T_A_HighLevelCommunicationInterface
public final java.lang.String getApplicationName()
T_A_HighLevelCommunicationInterface
getApplicationName
in interface T_A_HighLevelCommunicationInterface
public final boolean isConfiguration()
T_A_HighLevelCommunicationInterface
isConfiguration
in interface T_A_HighLevelCommunicationInterface
true
, wenn es sich um die Konfiguration handelt, sonst false
public final void continueAuthentication()
ServerHighLevelCommunication
continueAuthentication
in interface ServerHighLevelCommunication
public final void update(de.bsvrz.dav.daf.communication.lowLevel.telegrams.DataTelegram telegram)
update
in interface de.bsvrz.dav.daf.communication.lowLevel.HighLevelCommunicationCallbackInterface
public java.lang.String toString()
toString
in class java.lang.Object