|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.danet.an.workflow.api.DefaultRequester
This class provides an implementation of a
.
It class may be used directly if the events that are usually
delivered to a requester are of no interest.WfRequester
If events are to be processed, DefaultRequester
must
be subclassed with
overridden with the event handling code.receiveEvent
As an alternative to subclassing, a handler may be passed to the
constructor
. Events will then be forwarded to the handler. This is
convenient in situation where the implementation of
already exists and a
subclass would only do the forwarding. Note that the reference to the
handler is WfAuditHandler
transient
.
Field Summary | |
(package private) static long |
serialVersionUID
Serial version UID. |
Constructor Summary | |
|
DefaultRequester(WorkflowService wfs)
Creates a DefaultRequester for use with the given
workflow service. |
protected |
DefaultRequester(WorkflowService wfs,
boolean register)
Creates a DefaultRequester for use with the given
workflow service. |
|
DefaultRequester(WorkflowService wfs,
WfAuditHandler hdlr)
Creates a DefaultRequester for use with the given
workflow service. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isMemberOfPerformers(WfProcess wfProcess)
Check if the given process is among the performers of this requester. |
java.util.Collection |
performers()
Return all performers associated with this requester. |
void |
receiveEvent(WfAuditEvent wfAuditEvent)
Called by the workflow engine if an event occurs. |
java.lang.String |
toString()
Return a string representation for debugging purposes. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
static final long serialVersionUID
Constructor Detail |
public DefaultRequester(WorkflowService wfs) throws java.rmi.RemoteException
DefaultRequester
for use with the given
workflow service. The created requester will not receive events
until registered with a WorkflowService
.
wfs
- the workflow service.
java.rmi.RemoteException
- if thrown during requester registration
.public DefaultRequester(WorkflowService wfs, WfAuditHandler hdlr) throws java.rmi.RemoteException
DefaultRequester
for use with the given
workflow service. The created requester will forward received events
to the given handler.
wfs
- the workflow service.hdlr
- the event handler.
java.rmi.RemoteException
- if thrown during requester registration
.protected DefaultRequester(WorkflowService wfs, boolean register) throws java.rmi.RemoteException
DefaultRequester
for use with the given
workflow service. The created requester is automatically
registered at the given WorkflowService
.
wfs
- the workflow service.register
- if true
the requester will be
registered at the workflow service.
java.rmi.RemoteException
- if thrown during requester registration
.Method Detail |
public java.util.Collection performers() throws java.rmi.RemoteException
WfRequester
performers
in interface WfRequester
collection
of
associated performers.
java.rmi.RemoteException
- if a system-level error occurs.public boolean isMemberOfPerformers(WfProcess wfProcess) throws java.rmi.RemoteException
WfRequester
isMemberOfPerformers
in interface WfRequester
wfProcess
- the process in question.
true
if the process
is among
the performers of this requester.
java.rmi.RemoteException
- if a system-level error occurs.public void receiveEvent(WfAuditEvent wfAuditEvent) throws InvalidPerformerException, java.rmi.RemoteException
WfAuditHandler
receiveEvent
in interface WfAuditHandler
wfAuditEvent
- the event.
InvalidPerformerException
- thrown by the derived
WfRequester
if it receives an event from a
process that is not among its performers.
java.rmi.RemoteException
- if a system-level error occurs.public boolean equals(java.lang.Object obj)
obj
- the other object.
true
if the objects are equal.public int hashCode()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |