Package de.bsvrz.dav.dav.main
Class TelegramManager
java.lang.Object
de.bsvrz.dav.dav.main.TelegramManager
- All Implemented Interfaces:
TelegramManagerTransactionInterface
Diese Klasse verarbeitet ankommende Datentelegramme, prüft ob der Absender erlaubt war die Daten zu verschicken (Anmeldung gültig), wendet
eventuelle
AccessControlPlugin
s auf die Telegramme an und gibt sie dann an das passende SubscriptionInfo
-Objekt weiter, welches die
Telegramme an interessierte Empfänger weiterleitet.-
Constructor Summary
ConstructorsConstructorDescriptionTelegramManager
(HighLevelConnectionsManagerInterface connectionsManager, de.bsvrz.dav.daf.accessControl.AccessControlMode userRightsChecking) Erstellt einen neuen TelegramManager -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
convertTelegramsToBytes
(List<de.bsvrz.dav.daf.communication.lowLevel.telegrams.ApplicationDataTelegram> telegrams) static void
dumpTelegrams
(List<de.bsvrz.dav.daf.communication.lowLevel.telegrams.ApplicationDataTelegram> telegrams, de.bsvrz.dav.daf.main.impl.config.DafDataModel dataModel) long
getNextDataIndex
(de.bsvrz.dav.daf.communication.lowLevel.telegrams.BaseSubscriptionInfo info) Berechnet für eine Anmeldung den nächsten Datenindex und gibt diesen zurückGibt eine Map zurück, die als Key die AttributeGroupUsage-ID speichert und als Value alle zuständigen Plugins in einer Liste enthältvoid
handleDataTelegram
(CommunicationInterface communication, de.bsvrz.dav.daf.communication.lowLevel.telegrams.ApplicationDataTelegram applicationDataTelegram, long applicationId, boolean toCentralDistributor) Verarbeitet ein eingehendes Datentelegramvoid
handleDataTelegram
(CommunicationInterface communication, de.bsvrz.dav.daf.communication.lowLevel.telegrams.TransmitterDataTelegram transmitterDataTelegram) Verarbeitet ein eingehendes Datentelegram von einem anderen Datenverteilervoid
notifyIsNewCentralDistributor
(de.bsvrz.dav.daf.communication.lowLevel.telegrams.BaseSubscriptionInfo baseSubscriptionInfo) void
notifySubscriptionRemoved
(LocalReceivingSubscription receivingSubscription) Benachrichtigt den _davTransactionManager dass eine lokale Anmeldung nicht mehr vorhanden ist.void
notifySubscriptionRemoved
(LocalSendingSubscription sendingSubscription) Benachrichtigt den _davTransactionManager dass eine lokale Anmeldung nicht mehr vorhanden ist.void
notifyWasCentralDistributor
(de.bsvrz.dav.daf.communication.lowLevel.telegrams.BaseSubscriptionInfo baseSubscriptionInfo) void
sendTelegramsFromTransaction
(boolean isSource, de.bsvrz.dav.daf.communication.lowLevel.telegrams.ApplicationDataTelegram[] dataTelegrams, long applicationId) Sendet ein Telegram.void
setConfigurationAvailable
(SelfClientDavConnection selfClientDavConnection, ApplicationStatusUpdater applicationStatusUpdater) Initialisiert Funktionen, die von der Konfiguration abhängen (z.B.
-
Constructor Details
-
TelegramManager
public TelegramManager(HighLevelConnectionsManagerInterface connectionsManager, de.bsvrz.dav.daf.accessControl.AccessControlMode userRightsChecking) Erstellt einen neuen TelegramManager- Parameters:
connectionsManager
- VerbindungsverwaltunguserRightsChecking
- Welche Art von Rechteprüfung durchgeführt werden soll
-
-
Method Details
-
dumpTelegrams
public static void dumpTelegrams(List<de.bsvrz.dav.daf.communication.lowLevel.telegrams.ApplicationDataTelegram> telegrams, de.bsvrz.dav.daf.main.impl.config.DafDataModel dataModel) -
convertTelegramsToBytes
public static byte[] convertTelegramsToBytes(List<de.bsvrz.dav.daf.communication.lowLevel.telegrams.ApplicationDataTelegram> telegrams) -
setConfigurationAvailable
public void setConfigurationAvailable(SelfClientDavConnection selfClientDavConnection, ApplicationStatusUpdater applicationStatusUpdater) Initialisiert Funktionen, die von der Konfiguration abhängen (z.B. Rechteprüfung)- Parameters:
selfClientDavConnection
- eigene Datenverteiler-VerbindungapplicationStatusUpdater
- Klasse, die angemeldete Datensätze verschickt
-
getPluginFilterMap
Gibt eine Map zurück, die als Key die AttributeGroupUsage-ID speichert und als Value alle zuständigen Plugins in einer Liste enthält- Returns:
- eine unveränderliche Map vom Typ
Map<Long, List<AccessControlPluginInterface>>
(leer falls die Rechteprüfung deaktivert ist).
-
getSubscriptionsManager
-
getConnectionsManager
-
handleDataTelegram
public void handleDataTelegram(CommunicationInterface communication, de.bsvrz.dav.daf.communication.lowLevel.telegrams.TransmitterDataTelegram transmitterDataTelegram) Verarbeitet ein eingehendes Datentelegram von einem anderen Datenverteiler- Parameters:
communication
- Verbindung über die das Telegramm eingehttransmitterDataTelegram
- Telegram
-
handleDataTelegram
public void handleDataTelegram(CommunicationInterface communication, de.bsvrz.dav.daf.communication.lowLevel.telegrams.ApplicationDataTelegram applicationDataTelegram, long applicationId, boolean toCentralDistributor) Verarbeitet ein eingehendes Datentelegram- Parameters:
communication
- Verbindung über die das Telegramm eingehtapplicationDataTelegram
- TelegramapplicationId
- ID der sendenden ApplikationtoCentralDistributor
- wenn das Telegramm noch nicht beim Zentraldatenverteiler behandelt wurde, also der Datenindex noch nicht vernünftig gesetzt wurde
-
sendTelegramsFromTransaction
public void sendTelegramsFromTransaction(boolean isSource, de.bsvrz.dav.daf.communication.lowLevel.telegrams.ApplicationDataTelegram[] dataTelegrams, long applicationId) Description copied from interface:TelegramManagerTransactionInterface
Sendet ein Telegram. Wird vom DavTransactionManager benutzt, um manuell Telegramme mit einem vorgegebenen Datenindex zu senden.- Specified by:
sendTelegramsFromTransaction
in interfaceTelegramManagerTransactionInterface
- Parameters:
isSource
- true wenn QuelledataTelegrams
- Telegramm (oder mehrere falls gesplittet)applicationId
- ID der sendenden Applikation
-
getNextDataIndex
public long getNextDataIndex(de.bsvrz.dav.daf.communication.lowLevel.telegrams.BaseSubscriptionInfo info) Berechnet für eine Anmeldung den nächsten Datenindex und gibt diesen zurück- Specified by:
getNextDataIndex
in interfaceTelegramManagerTransactionInterface
- Parameters:
info
- Anmeldungs-Info- Returns:
- Ein Datenindex
-
notifySubscriptionRemoved
Benachrichtigt den _davTransactionManager dass eine lokale Anmeldung nicht mehr vorhanden ist. Der Transaktionsmanager meldet daraufhin eventuell vorhandene innere Datensätze ab.- Parameters:
sendingSubscription
- Sender-Anmeldung
-
notifySubscriptionRemoved
Benachrichtigt den _davTransactionManager dass eine lokale Anmeldung nicht mehr vorhanden ist. Der Transaktionsmanager meldet daraufhin eventuell vorhandene innere Datensätze ab.- Parameters:
receivingSubscription
- Empfänger-Anmeldung
-
notifyIsNewCentralDistributor
public void notifyIsNewCentralDistributor(de.bsvrz.dav.daf.communication.lowLevel.telegrams.BaseSubscriptionInfo baseSubscriptionInfo) -
notifyWasCentralDistributor
public void notifyWasCentralDistributor(de.bsvrz.dav.daf.communication.lowLevel.telegrams.BaseSubscriptionInfo baseSubscriptionInfo)
-