public class MessageListenerAdapter extends Object implements MessageListener
MessageListener
interface.
Extend it and overwrite some methods, if you want to have a listener that
handles only some message types.MessageListener
interface.Constructor and Description |
---|
MessageListenerAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
after(ChangePIStateMessage request,
ProcessInstance pi,
WfXMLMessage response)
Default implementation, does nothing.
|
void |
after(CreatePIMessage request,
ProcessInstance pi,
WfXMLMessage response)
Default implementation, does nothing.
|
void |
after(GetPIDataMessage request,
ProcessInstance pi,
WfXMLMessage response)
Default implementation, does nothing.
|
boolean |
before(ChangePIStateMessage request)
Default implementation, does nothing and returns
true . |
boolean |
before(CreatePIMessage request)
Default implementation, does nothing and returns
true . |
boolean |
before(GetPIDataMessage request)
Default implementation, does nothing and returns
true . |
boolean |
before(NotifyMessage request)
Default implementation, does nothing and returns
true . |
boolean |
before(PIStateChangedMessage request)
Default implementation, does nothing and returns
true . |
WfXMLMessage |
handle(GenericMessage request)
Default implementation, does nothing and returns
null . |
public WfXMLMessage handle(GenericMessage request)
null
.handle
in interface MessageListener
request
- The incoming request message.GenericMessage
). If you don't want to send a response, simply
return null
.public boolean before(CreatePIMessage request)
true
.before
in interface MessageListener
request
- The incoming CreateProcessInstance request.true
if you want that the WfXML layer processes the
message or false
if the message should not be processed.public boolean before(GetPIDataMessage request)
true
.before
in interface MessageListener
request
- The incoming GetProcessInstanceData request.true
if you want that the WfXML layer processes the
message or false
if the message should not be processed.public boolean before(ChangePIStateMessage request)
true
.before
in interface MessageListener
request
- The incoming ChangeProcessInstanceState request.true
if you want that the WfXML layer processes the
message or false
if the message should not be processed.public boolean before(PIStateChangedMessage request)
true
.before
in interface MessageListener
request
- The incoming ProcessInstanceStateChanged request.true
if you want that the WfXML layer passes the
message on to registered ProcessInstanceObserver
s or false
if the message should not be given to observers.public boolean before(NotifyMessage request)
true
.before
in interface MessageListener
request
- The incoming Notify request.true
if you want that the WfXML layer passes the
message on to registered ProcessInstanceObserver
s or false
if the message should not be given to observers.public void after(CreatePIMessage request, ProcessInstance pi, WfXMLMessage response)
after
in interface MessageListener
request
- The request that has been processed.pi
- The new process instance.response
- The response message that will be sent back to the requester,
or null
if no response will be sent. The response will be most
likely of type CreatePIMessage
.public void after(GetPIDataMessage request, ProcessInstance pi, WfXMLMessage response)
after
in interface MessageListener
request
- The request message that has been processed.pi
- The process instance of which data has been requested.response
- The response message that will be sent back to the requester.
Here the response message should always be available, because a
GetProcessInstanceData request requests data and so the response returns the
requested data. The response will be of type GetPIDataMessage
in
most cases.public void after(ChangePIStateMessage request, ProcessInstance pi, WfXMLMessage response)
after
in interface MessageListener
request
- The request message that has been processed.pi
- The affected process instance.response
- The response message that will be sent back to the requester.
For this message type the response contains the new process instance state,
so a response should always exist. The response message will be most likely
of type ChangePIStateMessage
.@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.