Class RemoteSourceSubscription

java.lang.Object
de.bsvrz.dav.dav.subscriptions.RemoteSourceSubscription
All Implemented Interfaces:
RemoteCentralSubscription, RemoteSendingSubscription, RemoteSubscription, SendingSubscription, Subscription

public class RemoteSourceSubscription
extends java.lang.Object
implements RemoteSendingSubscription, RemoteCentralSubscription
Anmeldung als Empfänger auf eine Quelle bei einem entfernten Zentraldatenverteiler
  • Constructor Summary

    Constructors
    Constructor Description
    RemoteSourceSubscription​(SubscriptionsManager subscriptionsManager, de.bsvrz.dav.daf.communication.lowLevel.telegrams.BaseSubscriptionInfo baseSubscriptionInfo, TransmitterCommunicationInterface connectionToRemoteDav)  
  • Method Summary

    Modifier and Type Method Description
    void addPotentialDistributor​(long transmitterId)  
    de.bsvrz.dav.daf.communication.protocol.UserLogin getAuthenticationState()
    Gibt die Id des angemeldeten Benutzers zurück.
    de.bsvrz.dav.daf.communication.lowLevel.telegrams.BaseSubscriptionInfo getBaseSubscriptionInfo()
    Gibt die Objekt-Attributgruppenverwendung-Simulationsvariante-Kombination zurück, auf die diese Anmeldung stattfindet
    long getCentralDistributorId()
    Gibt die Zentraldatenverteiler-ID zurück.
    TransmitterCommunicationInterface getCommunication()
    Gibt die Schnittstelle zum Kommunikationspartner zurück, also z.B. eine T_A oder T_T-Verbindung
    ConnectionState getConnectionState()
    Gibt den Verbindungsstatus zum Kommunikationspartner zurück
    long getNodeId()
    Liefert die Id der anmeldenden Applikation bzw. des anmeldenden Datenverteilers (nicht zwingend der direkt verbundene Datenverteiler, sondern der Kommunikationspartner, der die Daten bereitstellt oder empfängt)
    java.util.Set<java.lang.Long> getPotentialDistributors()  
    SenderState getState()
    Gibt den Status der Anmeldung zurück
    boolean isAllowed()
    Gibt zurück, ob die Anmeldung von der lokalen Rechteprüfung erlaubt ist
    boolean isRequestSupported()
    Gibt true zurück, wenn der Sender spezifiziert hat, dass er Sendesteuerung benutzen möchte.
    boolean isSource()
    Gibt true zurück, wenn es sich um eine Quelle handelt
    void removePotentialDistributor​(long transmitterId)  
    void setPotentialDistributors​(java.util.Collection<java.lang.Long> value)  
    void setRemoteState​(long mainTransmitterId, ConnectionState state)  
    void setState​(SenderState senderState, long centralTransmitterId)
    Setzt den Status der Anmeldung
    void subscribe()  
    java.lang.String toString()  
    void unsubscribe()
    Beendet die Datenanmeldung, sendet eventuelle Abmeldetelegramme

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • subscribe

      public final void subscribe()
      Specified by:
      subscribe in interface RemoteCentralSubscription
    • unsubscribe

      public void unsubscribe()
      Description copied from interface: Subscription
      Beendet die Datenanmeldung, sendet eventuelle Abmeldetelegramme
      Specified by:
      unsubscribe in interface Subscription
    • getPotentialDistributors

      public java.util.Set<java.lang.Long> getPotentialDistributors()
      Specified by:
      getPotentialDistributors in interface RemoteSubscription
    • setPotentialDistributors

      public void setPotentialDistributors​(java.util.Collection<java.lang.Long> value)
      Specified by:
      setPotentialDistributors in interface RemoteSubscription
    • addPotentialDistributor

      public void addPotentialDistributor​(long transmitterId)
      Specified by:
      addPotentialDistributor in interface RemoteSubscription
    • removePotentialDistributor

      public void removePotentialDistributor​(long transmitterId)
      Specified by:
      removePotentialDistributor in interface RemoteSubscription
    • isSource

      public boolean isSource()
      Description copied from interface: SendingSubscription
      Gibt true zurück, wenn es sich um eine Quelle handelt
      Specified by:
      isSource in interface SendingSubscription
      Returns:
      true, wenn es sich um eine Quelle handelt, sonst (Sender) false
    • getCentralDistributorId

      public long getCentralDistributorId()
      Description copied from interface: Subscription
      Gibt die Zentraldatenverteiler-ID zurück. Nur sinnvoll bei Quelle/Senke-Anmeldungen. Ist der Zentraldatenverteiler unbekannt, wird -1 zurückgegeben.
      Specified by:
      getCentralDistributorId in interface Subscription
      Returns:
      die Zentraldatenverteiler-ID
    • isRequestSupported

      public boolean isRequestSupported()
      Description copied from interface: SendingSubscription
      Gibt true zurück, wenn der Sender spezifiziert hat, dass er Sendesteuerung benutzen möchte. Hat nur eine Wirkung bei lokalen Anmeldungen.
      Specified by:
      isRequestSupported in interface SendingSubscription
      Returns:
      true, wenn der Sender spezifiziert hat, dass er Sendesteuerung benutzen möchte, sonst false
    • getState

      public SenderState getState()
      Description copied from interface: SendingSubscription
      Gibt den Status der Anmeldung zurück
      Specified by:
      getState in interface SendingSubscription
      Returns:
      den Status der Anmeldung
    • setState

      public void setState​(SenderState senderState, long centralTransmitterId)
      Description copied from interface: SendingSubscription
      Setzt den Status der Anmeldung
      Specified by:
      setState in interface SendingSubscription
      Parameters:
      senderState - neuer Status
    • getBaseSubscriptionInfo

      public de.bsvrz.dav.daf.communication.lowLevel.telegrams.BaseSubscriptionInfo getBaseSubscriptionInfo()
      Description copied from interface: Subscription
      Gibt die Objekt-Attributgruppenverwendung-Simulationsvariante-Kombination zurück, auf die diese Anmeldung stattfindet
      Specified by:
      getBaseSubscriptionInfo in interface Subscription
      Returns:
      BaseSubscriptionInfo
    • isAllowed

      public boolean isAllowed()
      Description copied from interface: Subscription
      Gibt zurück, ob die Anmeldung von der lokalen Rechteprüfung erlaubt ist
      Specified by:
      isAllowed in interface Subscription
      Returns:
    • getAuthenticationState

      public de.bsvrz.dav.daf.communication.protocol.UserLogin getAuthenticationState()
      Description copied from interface: Subscription
      Gibt die Id des angemeldeten Benutzers zurück. Liefert das gleiche wie getCommunication().getRemoteUserId()
      Specified by:
      getAuthenticationState in interface Subscription
      Returns:
      Id den angemeldeten Benutzers
    • getNodeId

      public long getNodeId()
      Description copied from interface: Subscription
      Liefert die Id der anmeldenden Applikation bzw. des anmeldenden Datenverteilers (nicht zwingend der direkt verbundene Datenverteiler, sondern der Kommunikationspartner, der die Daten bereitstellt oder empfängt)
      Specified by:
      getNodeId in interface Subscription
      Returns:
      Id der Applikation (bei T_A-Verbindungen) oder Id des Datenverteilers (bei T_T-Verbindungen)
    • getCommunication

      public TransmitterCommunicationInterface getCommunication()
      Description copied from interface: Subscription
      Gibt die Schnittstelle zum Kommunikationspartner zurück, also z.B. eine T_A oder T_T-Verbindung
      Specified by:
      getCommunication in interface RemoteSubscription
      Specified by:
      getCommunication in interface Subscription
      Returns:
      die Schnittstelle zum Kommunikationspartner
    • setRemoteState

      public void setRemoteState​(long mainTransmitterId, ConnectionState state)
      Specified by:
      setRemoteState in interface RemoteCentralSubscription
    • getConnectionState

      public ConnectionState getConnectionState()
      Description copied from interface: Subscription
      Gibt den Verbindungsstatus zum Kommunikationspartner zurück
      Specified by:
      getConnectionState in interface Subscription
      Returns:
      Verbindugnsstatus
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object