public class LocalReceivingSubscription extends Object implements LocalSubscription, ReceivingSubscription
Modifier and Type | Field and Description |
---|---|
private ApplicationCommunicationInterface |
_applicationConnection |
private long |
_applicationId |
private BaseSubscriptionInfo |
_baseSubscriptionInfo |
private static Debug |
_debug |
private boolean |
_drain |
private DataState |
_lastSendDataState |
private ReceiveOptions |
_receiveOptions |
private ReceiverState |
_receiverState |
private SubscriptionsManager |
_subscriptionsManager |
Constructor and Description |
---|
LocalReceivingSubscription(SubscriptionsManager subscriptionsManager,
BaseSubscriptionInfo baseSubscriptionInfo,
boolean drain,
ReceiveOptions receiveOptions,
ApplicationCommunicationInterface applicationConnection) |
Modifier and Type | Method and Description |
---|---|
BaseSubscriptionInfo |
getBaseSubscriptionInfo()
Gibt die Objekt-Attributgruppenverwendung-Simulationsvariante-Kombination zurück, auf die diese Anmeldung stattfindet
|
long |
getCentralDistributorId()
Gibt die Zentraldatenverteiler-ID zurück.
|
ApplicationCommunicationInterface |
getCommunication()
Gibt die Schnittstelle zum Kommunikationspartner zurück, also z.B.
|
ConnectionState |
getConnectionState()
Gibt den Verbindungsstatus zum Kommunikationspartner zurück
|
long |
getNodeId()
Liefert die Id der anmeldenden Applikation bzw.
|
ReceiveOptions |
getReceiveOptions()
Gibt die Empfangsoptionen zurück, die der Empfänger bei der Anmeldung spezifiziert hat
|
ReceiverState |
getState()
Gibt den Status des Empfängers zurück
|
long |
getUserId()
Gibt die Id des angemeldeten Benutzers zurück.
|
boolean |
isAllowed()
Gibt zurück, ob die Anmeldung von der lokalen Rechteprüfung erlaubt ist
|
boolean |
isDrain()
Gibt true zurück, wenn es sich um eine Senke handelt
|
void |
sendDataTelegram(ApplicationDataTelegram applicationDataTelegram)
Sendet Daten an den Empfänger
|
void |
sendStateTelegram(ReceiverState receiverState)
Sendet an einen Empfänger falls nötig im Falle eines geänderten Anmeldestatus einen leeren Datensatz mit dem entsprechenden Inhalt.
|
void |
setState(ReceiverState receiverState,
long centralTransmitterId)
Setzt den Status des Empfängers
|
String |
toString() |
void |
unsubscribe()
Beendet die Datenanmeldung, sendet eventuelle Abmeldetelegramme
|
private static final Debug _debug
private final SubscriptionsManager _subscriptionsManager
private final long _applicationId
private final BaseSubscriptionInfo _baseSubscriptionInfo
private final boolean _drain
private final ReceiveOptions _receiveOptions
private final ApplicationCommunicationInterface _applicationConnection
private DataState _lastSendDataState
private ReceiverState _receiverState
public LocalReceivingSubscription(SubscriptionsManager subscriptionsManager, BaseSubscriptionInfo baseSubscriptionInfo, boolean drain, ReceiveOptions receiveOptions, ApplicationCommunicationInterface applicationConnection)
public long getNodeId()
Subscription
getNodeId
in interface Subscription
public ConnectionState getConnectionState()
Subscription
getConnectionState
in interface Subscription
public long getCentralDistributorId()
Subscription
getCentralDistributorId
in interface Subscription
public void unsubscribe()
Subscription
unsubscribe
in interface Subscription
public ApplicationCommunicationInterface getCommunication()
Subscription
getCommunication
in interface LocalSubscription
getCommunication
in interface Subscription
public boolean isDrain()
ReceivingSubscription
isDrain
in interface ReceivingSubscription
public ReceiveOptions getReceiveOptions()
ReceivingSubscription
getReceiveOptions
in interface ReceivingSubscription
public void sendDataTelegram(ApplicationDataTelegram applicationDataTelegram)
ReceivingSubscription
sendDataTelegram
in interface ReceivingSubscription
applicationDataTelegram
- Telegrammpublic ReceiverState getState()
ReceivingSubscription
getState
in interface ReceivingSubscription
public void setState(ReceiverState receiverState, long centralTransmitterId)
ReceivingSubscription
setState
in interface ReceivingSubscription
receiverState
- neuer Statuspublic void sendStateTelegram(ReceiverState receiverState)
sendStateTelegram
in interface ReceivingSubscription
receiverState
- Empfängerstatuspublic BaseSubscriptionInfo getBaseSubscriptionInfo()
Subscription
getBaseSubscriptionInfo
in interface Subscription
public boolean isAllowed()
Subscription
isAllowed
in interface Subscription
public long getUserId()
Subscription
getUserId
in interface Subscription