Package de.bsvrz.dav.daf.main
Class DavRequester
- java.lang.Object
-
- de.bsvrz.dav.daf.main.DavRequester
-
- Direct Known Subclasses:
ClientDavRequester
public abstract class DavRequester extends java.lang.Object
Klasse zur Kommunikation mit dem Datenverteiler. Wird derzeit unter anderem für Anmeldungen von Transaktionsquellen/Senken und für die Abfrage von Anmeldungen für Debug-Zwecke benutzt.
-
-
Field Summary
Fields Modifier and Type Field Description protected AttributeGroup
_attributeGroup
protected ClientDavConnection
_connection
protected static de.bsvrz.sys.funclib.debug.Debug
_debug
protected Aspect
_receiveAspect
protected Aspect
_sendAspect
protected static int
ANSWER_ERROR
protected static int
ANSWER_OK
protected static int
APP_SUBSCRIPTION_INFO
protected static int
SUBSCRIBE_TRANSMITTER_DRAIN
protected static int
SUBSCRIBE_TRANSMITTER_SOURCE
protected static int
SUBSCRIPTION_INFO
-
Constructor Summary
Constructors Constructor Description DavRequester(ClientDavConnection connection, Aspect sendAspect, Aspect receiveAspect)
Erzeugt einen neuen DavRequester
-
Method Summary
Modifier and Type Method Description protected abstract void
onReceive(Data data)
Wird beim Empfang von Daten aufgerufenprotected void
sendBytes(long target, long requestId, long answerKind, byte[] data, SystemObject senderObject)
protected void
sendBytes(SystemObject target, long requestId, long answerKind, byte[] data, SystemObject senderObject)
Sendet eine Anfrage mit einem byte-Array als Datenprotected void
sendError(long target, long requestId, java.lang.String errorString, SystemObject senderObject)
protected void
sendError(SystemObject target, long requestId, java.lang.String errorString, SystemObject senderObject)
Sendet eine Anfrage mit einer Fehlernachrichtprotected void
subscribeDrain(SystemObject object)
Initialisiert den Dav-Requester und meldet sich als Senke für Nachrichten an.
-
-
-
Field Detail
-
_debug
protected static final de.bsvrz.sys.funclib.debug.Debug _debug
-
SUBSCRIBE_TRANSMITTER_SOURCE
protected static final int SUBSCRIBE_TRANSMITTER_SOURCE
- See Also:
- Constant Field Values
-
SUBSCRIBE_TRANSMITTER_DRAIN
protected static final int SUBSCRIBE_TRANSMITTER_DRAIN
- See Also:
- Constant Field Values
-
SUBSCRIPTION_INFO
protected static final int SUBSCRIPTION_INFO
- See Also:
- Constant Field Values
-
APP_SUBSCRIPTION_INFO
protected static final int APP_SUBSCRIPTION_INFO
- See Also:
- Constant Field Values
-
ANSWER_OK
protected static final int ANSWER_OK
- See Also:
- Constant Field Values
-
ANSWER_ERROR
protected static final int ANSWER_ERROR
- See Also:
- Constant Field Values
-
_connection
protected final ClientDavConnection _connection
-
_attributeGroup
protected final AttributeGroup _attributeGroup
-
_receiveAspect
protected final Aspect _receiveAspect
-
_sendAspect
protected final Aspect _sendAspect
-
-
Constructor Detail
-
DavRequester
public DavRequester(ClientDavConnection connection, Aspect sendAspect, Aspect receiveAspect)
Erzeugt einen neuen DavRequester- Parameters:
connection
- Verbindung zum DatenverteilersendAspect
- Sende-AspektreceiveAspect
- Empfangs-Aspekt
-
-
Method Detail
-
subscribeDrain
protected void subscribeDrain(SystemObject object)
Initialisiert den Dav-Requester und meldet sich als Senke für Nachrichten an.- Parameters:
object
- Applikation auf die sich angemeldet werden soll
-
onReceive
protected abstract void onReceive(Data data)
Wird beim Empfang von Daten aufgerufen- Parameters:
data
- Daten
-
sendError
protected void sendError(SystemObject target, long requestId, java.lang.String errorString, SystemObject senderObject) throws java.io.IOException
Sendet eine Anfrage mit einer Fehlernachricht- Parameters:
target
- Ziel-SystemobjektrequestId
- Anfrage-IDerrorString
- FehlermeldungsenderObject
- Eigenes Systemobjekt- Throws:
java.io.IOException
-
sendError
protected void sendError(long target, long requestId, java.lang.String errorString, SystemObject senderObject) throws java.io.IOException
- Throws:
java.io.IOException
-
sendBytes
protected void sendBytes(SystemObject target, long requestId, long answerKind, byte[] data, SystemObject senderObject) throws java.io.IOException
Sendet eine Anfrage mit einem byte-Array als Daten- Parameters:
target
- Ziel-SystemobjektrequestId
- Anfrage-IDanswerKind
- Nachrichtentypdata
- DatensenderObject
- Eigenes Systemobjekt- Throws:
java.io.IOException
-
sendBytes
protected void sendBytes(long target, long requestId, long answerKind, byte[] data, SystemObject senderObject) throws java.io.IOException
- Throws:
java.io.IOException
-
-