public abstract class DefaultIncomingMessageListener extends java.lang.Object implements IncomingMessageListener
IncomingMessageListener. All handle methods of
this class simply log their arguments to standard output and return either nothing, an empty
message of the proper type or throw a SOAPException.| Modifier and Type | Field and Description |
|---|---|
protected CredentialInfo |
credentialInfo |
| Constructor and Description |
|---|
DefaultIncomingMessageListener(CredentialInfo credentialInfo) |
| Modifier and Type | Method and Description |
|---|---|
CredentialInfo |
getCredentialInfo() |
EventSource |
getEvent(java.lang.String action) |
OperationDescription |
getOperation(java.lang.String action)
Returns an operation for a given wsa:Action.
|
void |
handle(ByeMessage bye,
ConnectionInfo connectionInfo)
Receives an incoming bye message.
|
GetResponseMessage |
handle(GetMessage get,
ConnectionInfo connectionInfo)
Receives an incoming get message.
|
GetMetadataResponseMessage |
handle(GetMetadataMessage getMetadata,
ConnectionInfo connectionInfo)
Receives an incoming get metadata message.
|
GetStatusResponseMessage |
handle(GetStatusMessage getStatus,
ConnectionInfo connectionInfo)
Receives an incoming get-status message (WS-Eventing).
|
void |
handle(HelloMessage hello,
ConnectionInfo connectionInfo)
Receives an incoming hello message.
|
InvokeMessage |
handle(InvokeMessage invokeRequest,
ConnectionInfo connectionInfo)
Receives an incoming invoke request.
|
ProbeMatchesMessage |
handle(ProbeMessage probe,
ConnectionInfo connectionInfo)
Receives an incoming probe message.
|
RenewResponseMessage |
handle(RenewMessage renew,
ConnectionInfo connectionInfo)
Receives an incoming renew message (WS-Eventing).
|
ResolveMatchesMessage |
handle(ResolveMessage resolve,
ConnectionInfo connectionInfo)
Receives a resolve message.
|
SubscribeResponseMessage |
handle(SubscribeMessage subscribe,
boolean useReferenceParameterMode,
ConnectionInfo connectionInfo)
Receives an incoming subscribe message.
|
void |
handle(SubscriptionEndMessage subscriptionEnd,
ConnectionInfo connectionInfo)
Receives an incoming subscription end message (WS-Eventing).
|
UnsubscribeResponseMessage |
handle(UnsubscribeMessage unsubscribe,
ConnectionInfo connectionInfo)
Receives an incoming unsubscribe message (WS-Eventing).
|
protected CredentialInfo credentialInfo
public DefaultIncomingMessageListener(CredentialInfo credentialInfo)
public CredentialInfo getCredentialInfo()
getCredentialInfo in interface IncomingMessageListenerpublic void handle(HelloMessage hello, ConnectionInfo connectionInfo)
IncomingMessageListenerhandle in interface IncomingMessageListenerhello - the messageconnectionInfo - protocol (aka. technology) specific data associated with the incoming message, e.g. source and target
addresses or other transport-related informationpublic void handle(ByeMessage bye, ConnectionInfo connectionInfo)
IncomingMessageListenerhandle in interface IncomingMessageListenerbye - the messageconnectionInfo - protocol (aka. technology) specific data associated with the incoming message, e.g. source and target
addresses or other transport-related informationpublic ProbeMatchesMessage handle(ProbeMessage probe, ConnectionInfo connectionInfo) throws SOAPException
IncomingMessageListenerProbeMatchesMessage must be returned. Otherwise, if the multicast probe
doesn't match, this method must return null. If the received probe is directed,
then this method must always return a ProbeMatchesMessage which, in the case of a
match, must be not empty.
When the incoming probe message is a directed one and for some reason this method fails
(e.g. this implementation doesn't support handling of probe messages, unexpected probe content,
etc.), a SOAPException describing the failure reason must be thrown. It will then be
forwarded to the original sender of the probe.
handle in interface IncomingMessageListenerprobe - the probe message to respond toconnectionInfo - protocol (aka. technology) specific data associated with the incoming message, e.g. source and target
addresses or other transport-related informationnull or either an empty or a proper probe matches message, depending on the type and content
of the received probe messageSOAPException - this exception may be raised only if a directed probe was received and its processing caused a failurepublic ResolveMatchesMessage handle(ResolveMessage resolve, ConnectionInfo connectionInfo)
IncomingMessageListenerresolve matches, a corresponding
(non-empty) ResolveMatchesMessage must be returned. Otherwise, this method must return
null.handle in interface IncomingMessageListenerresolve - the resolve message to respond toconnectionInfo - protocol (aka. technology) specific data associated with the incoming message, e.g. source and target
addresses or other transport-related informationnull in case the incoming resolve doesn't match, otherwise return the corresponding messagepublic GetResponseMessage handle(GetMessage get, ConnectionInfo connectionInfo) throws SOAPException
IncomingMessageListenerGetResponseMessage if processing
the get request succeeded. Must throw a SOAPException describing the failure otherwise.handle in interface IncomingMessageListenerget - the incoming get requestconnectionInfo - protocol (aka. technology) specific data associated with the incoming message, e.g. source and target
addresses or other transport-related informationSOAPException - only if processing the get request failed for some reason (e.g. when the receiving instance is not
capable of processing get requests, the request message is malformed, etc.)public GetMetadataResponseMessage handle(GetMetadataMessage getMetadata, ConnectionInfo connectionInfo) throws SOAPException
IncomingMessageListenerGetMetadataResponseMessage if processing the get metadata request succeeded. Must throw a
SOAPException describing the failure otherwise.handle in interface IncomingMessageListenergetMetadata - the incoming request to processconnectionInfo - protocol (aka. technology) specific data associated with the incoming message, e.g. source and target
addresses or other transport-related informationgetMetadata requestSOAPException - if processing the incoming metadata request fails, e.g. because this instance can not handle get metadata
messages or the request includes unexpected content, etc.public SubscribeResponseMessage handle(SubscribeMessage subscribe, boolean useReferenceParameterMode, ConnectionInfo connectionInfo) throws SOAPException
IncomingMessageListenerSubscribeResponseMessage or
throws a SOAPException if processing the incoming request fails for any reason.handle in interface IncomingMessageListenersubscribe - the incoming subscribe request to processconnectionInfo - protocol (aka. technology) specific data associated with the incoming message, e.g. source and target
addresses or other transport-related informationSOAPException - if processing the subscribe request fails for any reason, e.g. when this endpoint can not handle
subscribe requests, or the request's content is malformed, etc.public GetStatusResponseMessage handle(GetStatusMessage getStatus, ConnectionInfo connectionInfo) throws SOAPException
IncomingMessageListenerGetStatusResponseMessage or throws a SOAPException if processing the incoming request
fails for some reason.handle in interface IncomingMessageListenergetStatus - the incoming get-status request to processconnectionInfo - protocol (aka. technology) specific data associated with the incoming message, e.g. source and target
addresses or other transport-related informationSOAPException - if processing the get-status request fails for some reason, e.g. when this endpoint cannot handle
get-status requests, or the request's content is malformed, etc.public RenewResponseMessage handle(RenewMessage renew, ConnectionInfo connectionInfo) throws SOAPException
IncomingMessageListenerRenewResponseMessage or throws a SOAPException if processing the incoming request
fails for any reason.handle in interface IncomingMessageListenerrenew - the incoming renew request to processconnectionInfo - protocol (aka. technology) specific data associated with the incoming message, e.g. source and target
addresses or other transport-related informationSOAPException - if processing the renew request fails for some reason, e.g. when this endpoint cannot handle renew
requests, or the request's content is malformed, etc.public UnsubscribeResponseMessage handle(UnsubscribeMessage unsubscribe, ConnectionInfo connectionInfo) throws SOAPException
IncomingMessageListenerUnsubscribeResponseMessage or throws a SOAPException if processing the incoming
request fails for any reason.handle in interface IncomingMessageListenerunsubscribe - the incoming unsubscribe request to processconnectionInfo - protocol (aka. technology) specific data associated with the incoming message, e.g. source and target
addresses or other transport-related informationSOAPException - if processing the unsubscribe request fails for some reason, e.g. when this endpoint can not handle
unsubscribe requests, or the request's content is malformed, etc.public void handle(SubscriptionEndMessage subscriptionEnd, ConnectionInfo connectionInfo)
IncomingMessageListener
NOTE: As this type of message is a simple one-way notification, this method
neither has a return value, nor is declared to throw a SOAPException in case of a
failure. That is, errors occurring during processing of this message must be silently ignored
(this includes the case when this IncomingMessageListener instance doesn't process
subscription end messages at all).
handle in interface IncomingMessageListenersubscriptionEnd - the incoming subscription end messageconnectionInfo - protocol (aka. technology) specific data associated with the incoming message, e.g. source and target
addresses or other transport-related informationpublic InvokeMessage handle(InvokeMessage invokeRequest, ConnectionInfo connectionInfo) throws SOAPException
IncomingMessageListenernull, whereas for a request-response operation, the returned
InvokeMessage must contain a suitable response to the incoming request.
This method may throw a SOAPException under two distinct circumstances:
SOAPException is expected to correspond
to either one of those declared faults
IncomingMessageListener instance being unable to handle invoke requests:
then, the SOAPException must describe the exact failure reason in a way
independent from the actual declaration of the involved web service operation
handle in interface IncomingMessageListenerinvokeRequest - the incoming invoke request to processconnectionInfo - protocol (aka. technology) specific data associated with the incoming message, e.g. source and target
addresses or other transport-related informationnull for a one-way operation, or a response to the incoming requestSOAPException - either because processing the invoke request failed with an user-defined failure reason (i.e. a fault
declared by the concerned web service operation) or because of a more generic error such as this instance
being unable to process incoming invoke requests, or malformed request content, etc.public OperationDescription getOperation(java.lang.String action)
IncomingMessageListener
The result can be null for an implementation which does not use an operation at
all.
getOperation in interface IncomingMessageListeneraction - the wsa:Action which should be used to retrieve the operation.public EventSource getEvent(java.lang.String action)
getEvent in interface IncomingMessageListener