protected class ProxyService.ProxyServiceCallback extends DefaultResponseCallback
targetXAddressInfo| Modifier | Constructor and Description |
|---|---|
protected |
ProxyServiceCallback(XAddressInfo targetXAddressInfo,
Operation op,
ClientSubscription subscription) |
| Modifier and Type | Method and Description |
|---|---|
OperationDescription |
getOperation() |
void |
handle(GetStatusMessage getStatus,
GetStatusResponseMessage msg,
ConnectionInfo connectionInfo,
AttributedURI optionalMessageId)
Receives a
GetStatusResponseMessage. |
void |
handle(InvokeMessage invokeRequest,
InvokeMessage msg,
ConnectionInfo connectionInfo,
AttributedURI optionalMessageId)
Receives a
InvokeMessage as a response to another request InvokeMessage that has previously been sent by passing this ResponseCallback
instance as the third argument to the send method. |
void |
handle(Message request,
FaultMessage msg,
ConnectionInfo connectionInfo,
AttributedURI optionalMessageId)
Receives a
FaultMessage in response to a previously sent request
message. |
void |
handle(RenewMessage renew,
RenewResponseMessage msg,
ConnectionInfo connectionInfo,
AttributedURI optionalMessageId)
Receives a
RenewResponseMessage. |
void |
handle(SubscribeMessage subscribe,
SubscribeResponseMessage msg,
ConnectionInfo connectionInfo,
AttributedURI optionalMessageId)
Receives a
SubscribeResponseMessage. |
void |
handle(UnsubscribeMessage unsubscribe,
UnsubscribeResponseMessage msg,
ConnectionInfo connectionInfo,
AttributedURI optionalMessageId)
Receives an
UnsubscribeResponseMessage. |
void |
handleMalformedResponseException(Message request,
java.lang.Exception exception,
ConnectionInfo connectionInfo,
AttributedURI optionalMessageId)
Called when an exception occurs while receiving, decoding or processing the response message to
a previously sent
request. |
void |
handleNoContent(Message request,
java.lang.String reason,
ConnectionInfo connectionInfo,
AttributedURI optionalMessageId) |
void |
handleTimeout(Message request,
ConnectionInfo connectionInfo,
AttributedURI optionalMessageId)
Called when an attempt to receive responses to a previously sent request message passed to
CommunicationManager.send(Message, ProtocolInfo, DataStructure, ResponseCallback)
timeouted. |
void |
handleTransmissionException(Message request,
java.lang.Exception exception,
ConnectionInfo connectionInfo,
AttributedURI optionalMessageId)
Called when an exception arises while sending the
request message. |
getEvent, getTargetAddress, handle, handle, handle, handle, logResponse, requestStartedWithTimeout, setTargetAddressprotected ProxyServiceCallback(XAddressInfo targetXAddressInfo, Operation op, ClientSubscription subscription)
public void handle(SubscribeMessage subscribe, SubscribeResponseMessage msg, ConnectionInfo connectionInfo, AttributedURI optionalMessageId)
ResponseCallbackSubscribeResponseMessage. The corresponding SubscribeMessage has
been sent previously by passing this ResponseCallback instance as the fourth
argument to the send method.
Each SubscribeMessage may result in a call to either this method (in case of
successful two-way communication), or to methods:
ResponseCallback.handleTransmissionException(Message, Exception, ConnectionInfo, AttributedURI)
in case of a failure while sending the request message
ResponseCallback.handle(Message, FaultMessage, ConnectionInfo, AttributedURI) in case of a
failure during request processing on the server side
ResponseCallback.handleMalformedResponseException(Message, Exception, ConnectionInfo,
AttributedURI) in case of a failure during response processing on this side
ResponseCallback.handleTimeout(Message, ConnectionInfo, AttributedURI) in case of a timeout while
waiting for responses to the sent request.
handle in interface ResponseCallbackhandle in class DefaultResponseCallbacksubscribe - the original request messagemsg - a message containing the response to the previously sent requestconnectionInfo - protocol (aka. technology) specific addressing information attached to the received messagepublic void handle(InvokeMessage invokeRequest, InvokeMessage msg, ConnectionInfo connectionInfo, AttributedURI optionalMessageId)
ResponseCallbackInvokeMessage as a response to another request InvokeMessage that has previously been sent by passing this ResponseCallback
instance as the third argument to the send method.
Each request InvokeMessage may result in a call to either this method (in case of
successful two-way communication), or to methods:
ResponseCallback.handleTransmissionException(Message, Exception, ConnectionInfo, AttributedURI)
in case of a failure while sending the request message
ResponseCallback.handle(Message, FaultMessage, ConnectionInfo, AttributedURI) in case of a
failure during request processing on the server side
ResponseCallback.handleMalformedResponseException(Message, Exception, ConnectionInfo,
AttributedURI) in case of a failure during response processing on this side
ResponseCallback.handleTimeout(Message, ConnectionInfo, AttributedURI) in case of a timeout while
waiting for responses to the sent request.
In case of successful one-way communication, no method of this interface is called.
handle in interface ResponseCallbackhandle in class DefaultResponseCallbackinvokeRequest - the original request messagemsg - a message containing the response to the previously sent requestconnectionInfo - protocol (aka. technology) specific addressing information attached to the received messagepublic void handle(Message request, FaultMessage msg, ConnectionInfo connectionInfo, AttributedURI optionalMessageId)
ResponseCallbackFaultMessage in response to a previously sent request
message.
A fault is raised on the responding side while processing the request message and then sent
back to the requester (aka. this side). It is explicitly NOT created on this
side while processing the received response (see method ResponseCallback.handleMalformedResponseException(Message, Exception, ConnectionInfo, AttributedURI) for the
latter case).
handle in interface ResponseCallbackhandle in class DefaultResponseCallbackrequest - the original request messagemsg - the fault generated by the responding sideconnectionInfo - protocol (aka. technology) specific addressing information attached to the received messagepublic void handleMalformedResponseException(Message request, java.lang.Exception exception, ConnectionInfo connectionInfo, AttributedURI optionalMessageId)
ResponseCallbackrequest. The exception is passed to argument exception
handleMalformedResponseException in interface ResponseCallbackhandleMalformedResponseException in class DefaultResponseCallbackrequest - the original request messageexception - the exception caused during processing the responseconnectionInfo - protocol (aka. technology) specific addressing information related to the malformed responsepublic void handleNoContent(Message request, java.lang.String reason, ConnectionInfo connectionInfo, AttributedURI optionalMessageId)
handleNoContent in interface ResponseCallbackhandleNoContent in class DefaultResponseCallbackpublic void handleTransmissionException(Message request, java.lang.Exception exception, ConnectionInfo connectionInfo, AttributedURI optionalMessageId)
ResponseCallbackrequest message. This could be
e.g. due to network reachability reasons, an IO problem within the transport connection, an
invalid message construct, etc.handleTransmissionException in interface ResponseCallbackhandleTransmissionException in class DefaultResponseCallbackrequest - the request message which was meant to be sent when the exception occurredexception - the exception cause while sending the request messageconnectionInfo - protocol (aka. technology) specific addressing information related to the transmission exceptionpublic void handleTimeout(Message request, ConnectionInfo connectionInfo, AttributedURI optionalMessageId)
ResponseCallbackCommunicationManager.send(Message, ProtocolInfo, DataStructure, ResponseCallback)
timeouted. This can only happen when using an unreliable connectionless transport layer for
message transmission, such as UDP. Note that any other error related to sending the original
request message is notified by the callback method ResponseCallback.handleTransmissionException(Message,
Exception, ConnectionInfo, AttributedURI) . The original (request) message that was meant to
be sent is passed as argument request.handleTimeout in interface ResponseCallbackhandleTimeout in class DefaultResponseCallbackrequest - the message meant to be sent, which resulted in a timeoutconnectionInfo - protocol (aka. technology) specific addressing information attached to the received messagepublic void handle(RenewMessage renew, RenewResponseMessage msg, ConnectionInfo connectionInfo, AttributedURI optionalMessageId)
ResponseCallbackRenewResponseMessage. The corresponding RenewMessage has been sent
previously by passing this ResponseCallback instance as the fourth argument to the
send
method.
Each RenewMessage may result in a call to either this method (in case of successful
two-way communication), or to methods:
ResponseCallback.handleTransmissionException(Message, Exception, ConnectionInfo, AttributedURI)
in case of a failure while sending the request message
ResponseCallback.handle(Message, FaultMessage, ConnectionInfo, AttributedURI) in case of a
failure during request processing on the server side
ResponseCallback.handleMalformedResponseException(Message, Exception, ConnectionInfo,
AttributedURI) in case of a failure during response processing on this side
ResponseCallback.handleTimeout(Message, ConnectionInfo, AttributedURI) in case of a timeout while
waiting for responses to the sent request.
handle in interface ResponseCallbackhandle in class DefaultResponseCallbackrenew - the original request messagemsg - a message containing the response to the previously sent requestconnectionInfo - protocol (aka. technology) specific addressing information attached to the received messagepublic void handle(UnsubscribeMessage unsubscribe, UnsubscribeResponseMessage msg, ConnectionInfo connectionInfo, AttributedURI optionalMessageId)
ResponseCallbackUnsubscribeResponseMessage. The corresponding UnsubscribeMessage
has been sent previously by passing this ResponseCallback instance as the third
argument to the send method.
Each UnsubscribeMessage may result in a call to either this method (in case of
successful two-way communication), or to methods:
ResponseCallback.handleTransmissionException(Message, Exception, ConnectionInfo, AttributedURI)
in case of a failure while sending the request message
ResponseCallback.handle(Message, FaultMessage, ConnectionInfo, AttributedURI) in case of a
failure during request processing on the server side
ResponseCallback.handleMalformedResponseException(Message, Exception, ConnectionInfo,
AttributedURI) in case of a failure during response processing on this side
ResponseCallback.handleTimeout(Message, ConnectionInfo, AttributedURI) in case of a timeout while
waiting for responses to the sent request.
handle in interface ResponseCallbackhandle in class DefaultResponseCallbackunsubscribe - the original request messagemsg - a message containing the response to the previously sent requestconnectionInfo - protocol (aka. technology) specific addressing information attached to the received messagepublic void handle(GetStatusMessage getStatus, GetStatusResponseMessage msg, ConnectionInfo connectionInfo, AttributedURI optionalMessageId)
ResponseCallbackGetStatusResponseMessage. The corresponding GetStatusMessage has
been sent previously by passing this ResponseCallback instance as the fourth
argument to the send method.
Each GetStatusMessage may result in a call to either this method (in case of
successful two-way communication), or to methods:
ResponseCallback.handleTransmissionException(Message, Exception, ConnectionInfo, AttributedURI)
in case of a failure while sending the request message
ResponseCallback.handle(Message, FaultMessage, ConnectionInfo, AttributedURI) in case of a
failure during request processing on the server side
ResponseCallback.handleMalformedResponseException(Message, Exception, ConnectionInfo,
AttributedURI) in case of a failure during response processing on this side
ResponseCallback.handleTimeout(Message, ConnectionInfo, AttributedURI) in case of a timeout while
waiting for responses to the sent request.
handle in interface ResponseCallbackhandle in class DefaultResponseCallbackgetStatus - the original request messagemsg - a message containing the response to the previously sent requestconnectionInfo - protocol (aka. technology) specific addressing information attached to the received messagepublic OperationDescription getOperation()
getOperation in interface ResponseCallbackgetOperation in class DefaultResponseCallback