|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ws4d.java.communication.FaultAwareResponseCallback
public class FaultAwareResponseCallback
| Method Summary | |
|---|---|
OperationDescription |
getOperation()
|
XAddressInfo |
getTargetAddress()
|
void |
handle(Message request,
FaultMessage fault,
ProtocolData protocolData)
Receives a FaultMessage in response to a previously
sent request message. |
void |
handle(Message request,
GetMetadataResponseMessage getMetadataResponse,
ProtocolData protocolData)
Receives a GetMetadataResponseMessage. |
void |
handle(Message request,
GetResponseMessage getResponse,
ProtocolData protocolData)
Receives a GetResponseMessage. |
void |
handle(Message request,
GetStatusResponseMessage getStatusResponse,
ProtocolData protocolData)
Receives a GetStatusResponseMessage. |
void |
handle(Message request,
InvokeMessage invokeResponse,
ProtocolData protocolData)
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,
ProbeMatchesMessage probeMatches,
ProtocolData protocolData)
Receives a ProbeMatchesMessage in response to a previously
sent ProbeMessage. |
void |
handle(Message request,
RenewResponseMessage renewResponse,
ProtocolData protocolData)
Receives a RenewResponseMessage. |
void |
handle(Message request,
ResolveMatchesMessage resolveMatches,
ProtocolData protocolData)
Receives a ResolveMatchesMessage in response to a previously
sent ResolveMessage. |
void |
handle(Message request,
SubscribeResponseMessage subscribeResponse,
ProtocolData protocolData)
Receives a SubscribeResponseMessage. |
void |
handle(Message request,
UnsubscribeResponseMessage unsubscribeResponse,
ProtocolData protocolData)
Receives an UnsubscribeResponseMessage. |
void |
handleMalformedResponseException(Message request,
java.lang.Exception exception,
ProtocolData protocolData)
Called when an exception occurs while receiving, decoding or processing the response message to a previously sent request. |
void |
handleTimeout(Message request)
Called when an attempt to receive responses to a previously sent request message passed to CommunicationManager#send(Message, ProtocolDomain, ResponseCallback)
timeouted. |
void |
handleTransmissionException(Message request,
java.lang.Exception exception,
ProtocolData protocolData)
Called when an exception arises while sending the request
message. |
void |
setTargetAddress(XAddressInfo targetXAddressInfo)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void handle(Message request,
ProbeMatchesMessage probeMatches,
ProtocolData protocolData)
ResponseCallbackProbeMatchesMessage in response to a previously
sent ProbeMessage. This receiving ResponseCallback
instance is the one passed as third argument to the
send method.CommunicationManager in use) to
receive none, exactly one or multiple
ProbeMatchesMessages in response to a single sent
ProbeMessage. This method would therefore accordingly either not
get called at all, or get called once or multiple times..
If no responses to the sent resolve message are received within a
protocol-specific time period, the method ResponseCallback.handleTimeout(Message)
will be called.
handle in interface ResponseCallbackrequest - the original request messageprobeMatches - a message containing a response to the previously
sent requestprotocolData - protocol (aka. technology) specific addressing
information attached to the received message; this is
especially useful when
sending probe request messages over multiple different
technologies like DPWS, Bluetooth, ZigBee, etc. (which can be
done by specifying respective ProtocolDomains); the
supplied protocolData enables in such cases the
requester to distinguish which technology the search results
were obtained over
public void handle(Message request,
ResolveMatchesMessage resolveMatches,
ProtocolData protocolData)
ResponseCallbackResolveMatchesMessage in response to a previously
sent ResolveMessage. This receiving
ResponseCallback instance is the one passed as third
argument to the
send method.CommunicationManager in use) to
receive none or exactly one
ResolveMatchesMessage in response to a single sent
ResolveMessage. This method would thus accordingly either not get
called at all, or get called once.
If no responses to the sent resolve message are received within a
protocol-specific time period, method ResponseCallback.handleTimeout(Message)
will be called.
handle in interface ResponseCallbackrequest - the original request messageresolveMatches - a message containing a response to the previously
sent requestprotocolData - protocol (aka. technology) specific addressing
information attached to the received message; this is
especially useful when
sending resolve request messages over multiple different
technologies like DPWS, Bluetooth, ZigBee, etc. (which can be
done by specifying respective ProtocolDomains); the
supplied protocolData enables in such cases the
requester to distinguish which technology the result was
obtained over
public void handle(Message request,
GetResponseMessage getResponse,
ProtocolData protocolData)
ResponseCallbackGetResponseMessage. The corresponding
GetMessage has previously been sent by passing this
ResponseCallback instance as the third argument to the
send method.
Each GetMessage may result in a call to either this method (in
case of successful two-way communication), or to methods:
ResponseCallback.handleTransmissionException(Message, Exception, ProtocolData) in
case of a failure while sending the request message
ResponseCallback.handle(Message, FaultMessage, ProtocolData) in case of a
failure during request processing on the server sideResponseCallback.handleMalformedResponseException(Message, Exception, ProtocolData)
in case of a failure during response processing on this sideResponseCallback.handleTimeout(Message) in case of a timeout while waiting
for responses to the sent request.
handle in interface ResponseCallbackrequest - the original request messagegetResponse - a message containing the response to the previously
sent requestprotocolData - protocol (aka. technology) specific addressing
information attached to the received message
public void handle(Message request,
GetMetadataResponseMessage getMetadataResponse,
ProtocolData protocolData)
ResponseCallbackGetMetadataResponseMessage. The corresponding
GetMetadataMessage has previously been sent by passing this
ResponseCallback instance as the third argument to the
send method.
Each GetMetadataMessage may result in a call to either this
method (in case of successful two-way communication), or to methods:
ResponseCallback.handleTransmissionException(Message, Exception, ProtocolData) in
case of a failure while sending the request message
ResponseCallback.handle(Message, FaultMessage, ProtocolData) in case of a
failure during request processing on the server sideResponseCallback.handleMalformedResponseException(Message, Exception, ProtocolData)
in case of a failure during response processing on this sideResponseCallback.handleTimeout(Message) in case of a timeout while waiting
for responses to the sent request.
handle in interface ResponseCallbackrequest - the original request messagegetMetadataResponse - a message containing the response to the
previously sent requestprotocolData - protocol (aka. technology) specific addressing
information attached to the received message
public void handle(Message request,
SubscribeResponseMessage subscribeResponse,
ProtocolData protocolData)
ResponseCallbackSubscribeResponseMessage. The corresponding
SubscribeMessage has been sent previously by passing this
ResponseCallback instance as the third 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, ProtocolData) in
case of a failure while sending the request message
ResponseCallback.handle(Message, FaultMessage, ProtocolData) in case of a
failure during request processing on the server sideResponseCallback.handleMalformedResponseException(Message, Exception, ProtocolData)
in case of a failure during response processing on this sideResponseCallback.handleTimeout(Message) in case of a timeout while waiting
for responses to the sent request.
handle in interface ResponseCallbackrequest - the original request messagesubscribeResponse - a message containing the response to the
previously sent requestprotocolData - protocol (aka. technology) specific addressing
information attached to the received message
public void handle(Message request,
GetStatusResponseMessage getStatusResponse,
ProtocolData protocolData)
ResponseCallbackGetStatusResponseMessage. The corresponding
GetStatusMessage has been sent previously by passing this
ResponseCallback instance as the third 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, ProtocolData) in
case of a failure while sending the request message
ResponseCallback.handle(Message, FaultMessage, ProtocolData) in case of a
failure during request processing on the server sideResponseCallback.handleMalformedResponseException(Message, Exception, ProtocolData)
in case of a failure during response processing on this sideResponseCallback.handleTimeout(Message) in case of a timeout while waiting
for responses to the sent request.
handle in interface ResponseCallbackrequest - the original request messagegetStatusResponse - a message containing the response to the
previously sent requestprotocolData - protocol (aka. technology) specific addressing
information attached to the received message
public void handle(Message request,
RenewResponseMessage renewResponse,
ProtocolData protocolData)
ResponseCallbackRenewResponseMessage. The corresponding
RenewMessage has been sent previously by passing this
ResponseCallback instance as the third 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, ProtocolData) in
case of a failure while sending the request message
ResponseCallback.handle(Message, FaultMessage, ProtocolData) in case of a
failure during request processing on the server sideResponseCallback.handleMalformedResponseException(Message, Exception, ProtocolData)
in case of a failure during response processing on this sideResponseCallback.handleTimeout(Message) in case of a timeout while waiting
for responses to the sent request.
handle in interface ResponseCallbackrequest - the original request messagerenewResponse - a message containing the response to the previously
sent requestprotocolData - protocol (aka. technology) specific addressing
information attached to the received message
public void handle(Message request,
UnsubscribeResponseMessage unsubscribeResponse,
ProtocolData protocolData)
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, ProtocolData) in
case of a failure while sending the request message
ResponseCallback.handle(Message, FaultMessage, ProtocolData) in case of a
failure during request processing on the server sideResponseCallback.handleMalformedResponseException(Message, Exception, ProtocolData)
in case of a failure during response processing on this sideResponseCallback.handleTimeout(Message) in case of a timeout while waiting
for responses to the sent request.
handle in interface ResponseCallbackrequest - the original request messageunsubscribeResponse - a message containing the response to the
previously sent requestprotocolData - protocol (aka. technology) specific addressing
information attached to the received message
public void handle(Message request,
InvokeMessage invokeResponse,
ProtocolData protocolData)
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, ProtocolData) in
case of a failure while sending the request message
ResponseCallback.handle(Message, FaultMessage, ProtocolData) in case of a
failure during request processing on the server sideResponseCallback.handleMalformedResponseException(Message, Exception, ProtocolData)
in case of a failure during response processing on this sideResponseCallback.handleTimeout(Message) in case of a timeout while waiting
for responses to the sent request.
handle in interface ResponseCallbackrequest - the original request messageinvokeResponse - a message containing the response to the previously
sent requestprotocolData - protocol (aka. technology) specific addressing
information attached to the received message
public void handle(Message request,
FaultMessage fault,
ProtocolData protocolData)
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, ProtocolData)
for the latter case).
handle in interface ResponseCallbackrequest - the original request messagefault - the fault generated by the responding sideprotocolData - protocol (aka. technology) specific addressing
information attached to the received messagepublic void handleTimeout(Message request)
ResponseCallbackCommunicationManager#send(Message, ProtocolDomain, 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, ProtocolData).
The original (request) message that was meant to be sent is passed as
argument request.
handleTimeout in interface ResponseCallbackrequest - the message meant to be sent, which resulted in a timeout
public void handleTransmissionException(Message request,
java.lang.Exception exception,
ProtocolData protocolData)
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 ResponseCallbackrequest - the request message which was meant to be sent when the
exception occurredexception - the exception cause while sending the request messageprotocolData - protocol (aka. technology) specific addressing
information related to the transmission exception
public void handleMalformedResponseException(Message request,
java.lang.Exception exception,
ProtocolData protocolData)
ResponseCallbackrequest. The
exception is passed to argument exception
handleMalformedResponseException in interface ResponseCallbackrequest - the original request messageexception - the exception caused during processing the responseprotocolData - protocol (aka. technology) specific addressing
information related to the malformed responsepublic OperationDescription getOperation()
getOperation in interface ResponseCallbackpublic void setTargetAddress(XAddressInfo targetXAddressInfo)
setTargetAddress in interface ResponseCallbackpublic XAddressInfo getTargetAddress()
getTargetAddress in interface ResponseCallback
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||