|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.dream.AbstractComponent
org.objectweb.dream.router.AbstractBasicRouterImpl
Abstract implementation of a basic Push/Push router. A Push/Push router
routes messages received on its Push input to one of its Push outputs. A
Push/Push router has also a defaultOutPushItf
that can be
bound to route messages for which no routes are found.
Outputs are stored in the outPushMap
Map. The output
corresponding to an incoming message is retrieved using the abstract
getOutput(Message, Map)
method. To avoid unnecessary building of
routes the getOutput(Message, Map)
can test
the boolean initialized
which is set to false
each time the router is bound to a new output.
Field Summary | |
static String |
DEFAULT_OUT_PUSH_ITF_NAME
The name of the default Push client interface. |
protected Push |
defaultOutPushItf
Default Push interface to be used if no Push interface can be found in outPushTable . |
protected boolean |
initialized
true if the route table is initialized. |
protected MessageManager |
messageManagerItf
the message manager client interface of this component |
protected Map |
outPushMap
Map of outPush interfaces binded to this router |
Fields inherited from class org.objectweb.dream.AbstractComponent |
bindingLogger, componentDesc, fcState, lifeCycleLogger, logger, weaveableC |
Fields inherited from interface org.objectweb.dream.Push |
IN_PUSH_ITF_NAME, OUT_PUSH_ITF_NAME |
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController |
STARTED, STOPPED |
Constructor Summary | |
AbstractBasicRouterImpl()
Default contructor |
Method Summary | |
void |
bindFc(String clientItfName,
Object serverItf)
|
protected abstract Push |
getOutput(Message message,
Map context)
|
String[] |
listFc()
|
void |
push(Message message,
Map context)
Sends the incoming message to one of the router's output. |
void |
unbindFc(String clientItfName)
|
Methods inherited from class org.objectweb.dream.AbstractComponent |
getFcState, initComponent, lookupFc, setLogger, startFc, stopFc |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Map outPushMap
public static final String DEFAULT_OUT_PUSH_ITF_NAME
Push
client interface.
protected Push defaultOutPushItf
outPushTable
.
protected MessageManager messageManagerItf
protected boolean initialized
true
if the route table is initialized.
Constructor Detail |
public AbstractBasicRouterImpl()
Method Detail |
protected abstract Push getOutput(Message message, Map context) throws PushException
PushException
public void push(Message message, Map context) throws PushException
getOutput(Message, Map)
method. If
this method returns null
, the
defaultOutPushItf
is used if it is bound.
push
in interface Push
message
- the pushed messagecontext
- a context propagated to the selected route.
PushException
- if no route can be found, or thown by client push.Push.push(Message, Map)
public String[] listFc()
listFc
in interface BindingController
BindingController.listFc()
public void bindFc(String clientItfName, Object serverItf) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException
bindFc
in interface BindingController
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
BindingController.bindFc(String,
Object)
public void unbindFc(String clientItfName) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException
unbindFc
in interface BindingController
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
BindingController.unbindFc(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |