|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.doolin.bus.support.SubscriberAdapter<M>
M - Type of message that is handled by this subscriber.public class SubscriberAdapter<M>
This Subscriber delegates its methods to a
SubscriberValidator, a SubscriberTrigger and a
SubscriberExecution.
| Constructor Summary | |
|---|---|
SubscriberAdapter(SubscriberValidator validator,
SubscriberTrigger<M> trigger,
SubscriberExecution<M> execution)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
accept(M message)
Checks the message |
String |
getExecutionDescription()
Describes the execution. |
Class<M> |
getMessageClass()
Gets the class that this subscriber accepts to handle |
String |
getTriggerDescription()
Description for the trigger |
String |
getValidatorDescription()
Gets a description for this validator |
boolean |
isValid()
Checks if the subscription is still valid. |
void |
receive(M message)
This method called whenever a message is received. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SubscriberAdapter(SubscriberValidator validator,
SubscriberTrigger<M> trigger,
SubscriberExecution<M> execution)
validator - The validator to usetrigger - The trigger to useexecution - The execution to use| Method Detail |
|---|
public Class<M> getMessageClass()
SubscriberTrigger
getMessageClass in interface SubscriberTrigger<M>public String getExecutionDescription()
SubscriberExecution
getExecutionDescription in interface SubscriberExecution<M>public String getTriggerDescription()
SubscriberTrigger
getTriggerDescription in interface SubscriberTrigger<M>public String getValidatorDescription()
SubscriberValidator
getValidatorDescription in interface SubscriberValidatorpublic boolean isValid()
SubscriberValidator
isValid in interface SubscriberValidatortrue if the subscription is still valid,
false otherwise.public void receive(M message)
SubscriberExecution
receive in interface SubscriberExecution<M>message - Message to handlepublic boolean accept(M message)
SubscriberTrigger
accept in interface SubscriberTrigger<M>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||