org.objectweb.dream.router
Class RouterChunkNameImpl

java.lang.Object
  extended by org.objectweb.dream.AbstractComponent
      extended by org.objectweb.dream.router.RouterChunkNameImpl
All Implemented Interfaces:
ContextualBindingController, NeedAsyncStartController, PrepareStopLifeCycleController, Loggable, Push, RouterChunkNameAttributeController, AttributeController, BindingController, LifeCycleController

public class RouterChunkNameImpl
extends AbstractComponent
implements Push, RouterChunkNameAttributeController

A basic router implementation with two outputs : out-push-with-chunk and out-push-without-chunk. The first one is used if pushed messages contain a specified chunk name, the second one is used otherwise. The chunk name to check is specified as attribute.


Field Summary
protected  String chunkName
          the chunk name to test
protected  MessageManager messageManagerItf
           
static String OUTPUSH_WITH_CHUNK_ITF_NAME
          The name of client interface used to push messages with the specified chunk name.
static String OUTPUSH_WITHOUT_CHUNK_ITF_NAME
          The name of client interface used to push messages without the specified chunk name.
protected  Push outPushWithChunkItf
          The interface used to push messages with the specified chunk name.
protected  Push outPushWithoutChunkItf
          The interface used to push messages without the specified chunk name.
 
Fields inherited from class org.objectweb.dream.AbstractComponent
bindingLogger, fcNeedAsyncStart, fcState, lifeCycleLogger, logger, weaveableC
 
Fields inherited from interface org.objectweb.dream.Push
IN_PUSH_ITF_NAME, INCOMING_IN_PUSH_ITF_NAME, INCOMING_OUT_PUSH_ITF_NAME, OUT_PUSH_ITF_NAME, OUTGOING_IN_PUSH_ITF_NAME, OUTGOING_OUT_PUSH_ITF_NAME
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
RouterChunkNameImpl()
           
 
Method Summary
 void bindFc(String clientItfName, Object serverItf)
           
 String getChunkName()
          Returns the chunk name used by chunk name routeur.
 String[] listFc()
           
 void push(Message message)
           
 void setChunkName(String chunkName)
          Sets the chunk name used by chunk name routeur.
 
Methods inherited from class org.objectweb.dream.AbstractComponent
beforeFirstStart, bindFc, getFcNeedAsyncStart, getFcState, initComponent, lookupFc, prepareStopFc, setLogger, startFc, stopFc, unbindFc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OUTPUSH_WITH_CHUNK_ITF_NAME

public static final String OUTPUSH_WITH_CHUNK_ITF_NAME
The name of client interface used to push messages with the specified chunk name.

See Also:
Constant Field Values

OUTPUSH_WITHOUT_CHUNK_ITF_NAME

public static final String OUTPUSH_WITHOUT_CHUNK_ITF_NAME
The name of client interface used to push messages without the specified chunk name.

See Also:
Constant Field Values

outPushWithChunkItf

protected Push outPushWithChunkItf
The interface used to push messages with the specified chunk name.


outPushWithoutChunkItf

protected Push outPushWithoutChunkItf
The interface used to push messages without the specified chunk name.


messageManagerItf

protected MessageManager messageManagerItf

chunkName

protected String chunkName
the chunk name to test

Constructor Detail

RouterChunkNameImpl

public RouterChunkNameImpl()
Method Detail

push

public void push(Message message)
          throws PushException
Specified by:
push in interface Push
Throws:
PushException
See Also:
Push.push(Message)

getChunkName

public String getChunkName()
Description copied from interface: RouterChunkNameAttributeController
Returns the chunk name used by chunk name routeur.

Specified by:
getChunkName in interface RouterChunkNameAttributeController
Returns:
the chunk name used by chunk name routeur.
See Also:
RouterChunkNameAttributeController.getChunkName()

setChunkName

public void setChunkName(String chunkName)
Description copied from interface: RouterChunkNameAttributeController
Sets the chunk name used by chunk name routeur.

Specified by:
setChunkName in interface RouterChunkNameAttributeController
Parameters:
chunkName - the chunk name used by chunk name routeur.
See Also:
RouterChunkNameAttributeController.setChunkName(String)

listFc

public String[] listFc()
Specified by:
listFc in interface BindingController
See Also:
BindingController.listFc()

bindFc

public void bindFc(String clientItfName,
                   Object serverItf)
            throws NoSuchInterfaceException,
                   IllegalBindingException,
                   IllegalLifeCycleException
Specified by:
bindFc in interface BindingController
Overrides:
bindFc in class AbstractComponent
Throws:
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
See Also:
BindingController.bindFc(String, Object)


Copyright © 2003, 2005 - INRIA Rhone-Alpes - All Rights Reserved.