public class TransactionManager extends java.lang.Object implements Transactions
Klasse, die Transaktionen verwaltet.
| Modifier and Type | Class and Description |
|---|---|
private class |
TransactionManager.TransactionReceiver |
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<TransactionDataDescription,java.util.Collection<InnerDataSubscription>> |
_allowedDataIdentifications
Bildet pro Datenidentifikation bzw.
|
private ClientDavConnection |
_connection |
private java.util.Map<TransactionDataDescription,ClientReceiverInterface> |
_realReceivers
Bildet pro Datenidentifikation die Empfänger ab, die die Rohdaten empfangen und dann verarbeitet an die eigentliche Applikation weitergeben
|
private java.util.Map<TransactionDataDescription,java.util.Collection<InnerDataSubscription>> |
_requiredDataIdentifications
Bildet pro Datenidentifikation bzw.
|
| Constructor and Description |
|---|
TransactionManager(ClientDavConnection connection)
Erstellt einen neuen TransaktionsManager zur Verwaltung von Transaktionen
|
| Modifier and Type | Method and Description |
|---|---|
private Transaction |
createTransaction(ResultData result) |
private boolean |
equals(Data item,
InnerDataSubscription subscription,
SystemObject transactionObject)
Prüft, ob die Datenidentifikation in einem Data-Objekt mit einer Datenidentifikation in einer InnerDataSubscription übereinstimmt, und ob das Transaktionsobjekt übereinstimmt, wenn NurTransaktionsObjekt im Data festgelegt ist.
|
private ClientReceiverInterface |
getRealReceiver(TransactionDataDescription receiver) |
void |
sendTransaction(TransactionDataDescription dataDescription,
java.util.Collection<ResultData> data)
Sendet eine Transaktion mit dem Transaktiondatensatz-Zeitstempel der aktuellen Zeit.
|
void |
sendTransaction(TransactionDataDescription dataDescription,
java.util.Collection<ResultData> data,
long dataTime)
Sendet eine Transaktion
|
void |
sendTransaction(TransactionResultData data)
Sendet eine Transaktion
|
void |
subscribeDrain(TransactionReceiverInterface receiver,
TransactionDataDescription dataDescription,
java.util.Collection<InnerDataSubscription> subscriptions)
Meldet eine Transaktionssenke an.
|
void |
subscribeReceiver(TransactionReceiverInterface receiver,
TransactionDataDescription dataDescription)
Meldet einen Transaktionsempfänger an.
|
private void |
subscribeReceiver(TransactionReceiverInterface receiver,
TransactionDataDescription dataDescription,
java.util.Collection<InnerDataSubscription> subscriptions)
Meldet eine Senke oder einen Empfänger an
|
void |
subscribeSender(TransactionSenderInterface sender,
TransactionDataDescription dataDescription)
Meldet einen Transaktionssender an.
|
void |
subscribeSource(TransactionSenderInterface sender,
TransactionDataDescription dataDescription,
java.util.Collection<InnerDataSubscription> subscriptions)
Meldet eine Transaktionsquelle an und sendet einen leeren Datensatz.
|
void |
subscribeSource(TransactionSenderInterface sender,
TransactionDataDescription dataDescription,
java.util.Collection<InnerDataSubscription> subscriptions,
java.util.Collection<ResultData> initialData,
long time)
Meldet eine Transaktionsquelle an und sendet einen Transaktionsdatensatz.
|
private void |
testSend(TransactionResultData data) |
private void |
testSubscribe(TransactionDataDescription dataDescription,
java.util.Collection<InnerDataSubscription> subscriptions) |
java.lang.String |
toString() |
void |
unsubscribeReceiver(TransactionReceiverInterface receiver,
TransactionDataDescription dataDescription)
Meldet einen Transaktionempfänger oder eine Transaktionssenke ab.
|
void |
unsubscribeSender(TransactionSenderInterface sender,
TransactionDataDescription dataDescription)
Meldet einen Transaktionsender oder eine Transaktionsquelle ab.
|
private final ClientDavConnection _connection
private final java.util.Map<TransactionDataDescription,ClientReceiverInterface> _realReceivers
Bildet pro Datenidentifikation die Empfänger ab, die die Rohdaten empfangen und dann verarbeitet an die eigentliche Applikation weitergeben
private final java.util.Map<TransactionDataDescription,java.util.Collection<InnerDataSubscription>> _allowedDataIdentifications
Bildet pro Datenidentifikation bzw. Anmeldung die erlaubten Datenidentifikationen ab.
private final java.util.Map<TransactionDataDescription,java.util.Collection<InnerDataSubscription>> _requiredDataIdentifications
Bildet pro Datenidentifikation bzw. Anmeldung die benötigten Datenidentifikationen ab.
public TransactionManager(ClientDavConnection connection)
Erstellt einen neuen TransaktionsManager zur Verwaltung von Transaktionen
connection - Verbindung zum Datenverteilerpublic void subscribeSource(TransactionSenderInterface sender, TransactionDataDescription dataDescription, java.util.Collection<InnerDataSubscription> subscriptions, java.util.Collection<ResultData> initialData, long time) throws OneSubscriptionPerSendData
TransactionsMeldet eine Transaktionsquelle an und sendet einen Transaktionsdatensatz.
subscribeSource in interface Transactionssender - Callback zur SendesteuerungdataDescription - Datenidentifikation der Transaktion (Transaktionsobjekt, -attributgruppe, -aspekt)subscriptions - Datenidentifikationen innerhalb der TransaktioninitialData - Initialer Datensatztime - Datenzeit des TransaktionsdatensatzesOneSubscriptionPerSendData - Falls es schon eine Quellen-Anmeldung zu dieser Transaktion oder einem enthaltenen Datensatz gibt.public void sendTransaction(TransactionDataDescription dataDescription, java.util.Collection<ResultData> data) throws SendSubscriptionNotConfirmed
TransactionsSendet eine Transaktion mit dem Transaktiondatensatz-Zeitstempel der aktuellen Zeit. Innere Daten können einen anderen Zeitstempel haben.
sendTransaction in interface TransactionsdataDescription - Datenidentifikation der Transaktion (Transaktionsobjekt, -attributgruppe, -aspekt)data - Liste mit DatenSendSubscriptionNotConfirmed - Bei fehlender Sender-Anmeldungpublic void sendTransaction(TransactionDataDescription dataDescription, java.util.Collection<ResultData> data, long dataTime) throws SendSubscriptionNotConfirmed
TransactionsSendet eine Transaktion
sendTransaction in interface TransactionsdataDescription - Datenidentifikation der Transaktion (Transaktionsobjekt, -attributgruppe, -aspekt)data - Liste mit DatendataTime - Datenzeit (des Transaktionsdatensatzes)SendSubscriptionNotConfirmed - Bei fehlender Sender-Anmeldungpublic void sendTransaction(TransactionResultData data) throws SendSubscriptionNotConfirmed
TransactionsSendet eine Transaktion
sendTransaction in interface Transactionsdata - TransaktionSendSubscriptionNotConfirmed - Bei fehlender Sender-Anmeldungprivate void testSend(TransactionResultData data)
public void unsubscribeReceiver(TransactionReceiverInterface receiver, TransactionDataDescription dataDescription)
TransactionsMeldet einen Transaktionempfänger oder eine Transaktionssenke ab.
unsubscribeReceiver in interface Transactionsreceiver - Empfänger-KlassedataDescription - Datenidentifikation der Transaktion (Transaktionsobjekt, -attributgruppe, -aspekt)private ClientReceiverInterface getRealReceiver(TransactionDataDescription receiver)
public void unsubscribeSender(TransactionSenderInterface sender, TransactionDataDescription dataDescription)
TransactionsMeldet einen Transaktionsender oder eine Transaktionsquelle ab.
unsubscribeSender in interface Transactionssender - Sender-KlassedataDescription - Datenidentifikation der Transaktion (Transaktionsobjekt, -attributgruppe, -aspekt)public void subscribeSource(TransactionSenderInterface sender, TransactionDataDescription dataDescription, java.util.Collection<InnerDataSubscription> subscriptions) throws OneSubscriptionPerSendData
TransactionsMeldet eine Transaktionsquelle an und sendet einen leeren Datensatz.
subscribeSource in interface Transactionssender - Callback zur SendesteuerungdataDescription - Datenidentifikation der Transaktion (Transaktionsobjekt, -attributgruppe, -aspekt)subscriptions - Datenidentifikationen innerhalb der TransaktionOneSubscriptionPerSendData - Falls es schon eine Quellen-Anmeldung zu dieser Transaktion oder einem enthaltenen Datensatz gibt.private void testSubscribe(TransactionDataDescription dataDescription, java.util.Collection<InnerDataSubscription> subscriptions)
private boolean equals(Data item, InnerDataSubscription subscription, SystemObject transactionObject)
Prüft, ob die Datenidentifikation in einem Data-Objekt mit einer Datenidentifikation in einer InnerDataSubscription übereinstimmt, und ob das Transaktionsobjekt übereinstimmt, wenn NurTransaktionsObjekt im Data festgelegt ist.
item - Data-Objektsubscription - Anmelde-InfotransactionObject - Transaktionsobjekt (zur Prüfung von NurTransaktionsObjekt)public void subscribeSender(TransactionSenderInterface sender, TransactionDataDescription dataDescription) throws OneSubscriptionPerSendData
TransactionsMeldet einen Transaktionssender an.
subscribeSender in interface Transactionssender - Callback zur SendesteuerungdataDescription - Datenidentifikation der Transaktion (Transaktionsobjekt, -attributgruppe, -aspekt)OneSubscriptionPerSendData - Falls es schon eine widersprüchliche Anmeldung zu dieser Transaktion oder einem enthaltenen Datensatz gibt.public void subscribeReceiver(TransactionReceiverInterface receiver, TransactionDataDescription dataDescription) throws OneSubscriptionPerSendData
TransactionsMeldet einen Transaktionsempfänger an.
subscribeReceiver in interface Transactionsreceiver - Callback zum Empfang von DatendataDescription - Datenidentifikation der Transaktion (Transaktionsobjekt, -attributgruppe, -aspekt)OneSubscriptionPerSendData - Falls es schon eine widersprüchliche Anmeldung zu dieser Transaktion oder einem enthaltenen Datensatz gibt.public void subscribeDrain(TransactionReceiverInterface receiver, TransactionDataDescription dataDescription, java.util.Collection<InnerDataSubscription> subscriptions) throws OneSubscriptionPerSendData
TransactionsMeldet eine Transaktionssenke an.
subscribeDrain in interface Transactionsreceiver - Callback zum Empfang von DatendataDescription - Datenidentifikation der Transaktion (Transaktionsobjekt, -attributgruppe, -aspekt)subscriptions - Datenidentifikationen innerhalb der TransaktionOneSubscriptionPerSendData - Falls es schon eine widersprüchliche Anmeldung zu dieser Transaktion oder einem enthaltenen Datensatz gibt.private void subscribeReceiver(TransactionReceiverInterface receiver, TransactionDataDescription dataDescription, java.util.Collection<InnerDataSubscription> subscriptions) throws OneSubscriptionPerSendData
Meldet eine Senke oder einen Empfänger an
receiver - EmpfängerdataDescription - Datenbeschreibungsubscriptions - Innere Anmeldungen falls Senke, sonst nullOneSubscriptionPerSendData - Fehlerprivate Transaction createTransaction(ResultData result)
public java.lang.String toString()
toString in class java.lang.Object