org.objectweb.dream.channel
Class BasicAddIPChannelSourceChunkImpl

java.lang.Object
  extended byorg.objectweb.dream.AbstractComponent
      extended byorg.objectweb.dream.PushPushDreamComponent
          extended byorg.objectweb.dream.channel.BasicAddIPChannelSourceChunkImpl
All Implemented Interfaces:
AddIPChannelAttributeController, AttributeController, BindingController, LifeCycleController, Loggable, Push

public class BasicAddIPChannelSourceChunkImpl
extends PushPushDreamComponent
implements AddIPChannelAttributeController

This message transformer adds a IPChannelSourceChunkcontaining the inet address and the listenning port of a channel.
The name of the added chunk is by default IPChannelSourceChunk.DEFAULT_NAME, it can be changed using AddIPChannelAttributeController.setChunkName(String).
The inet address can be specified using the AddIPChannelAttributeController.setInetAddress(String)method. If not specified, the local address is used.


Field Summary
protected  String chunkName
          the name of the IPChannelDestinationChunk added by this transformer.
protected  InetAddress inetAddress
          the inet address set in the chunk.
protected  MessageManager messageManagerItf
          the message manager client interface of this component.
protected  int port
          the port set in the chunk.
 
Fields inherited from class org.objectweb.dream.PushPushDreamComponent
outPushItf
 
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
BasicAddIPChannelSourceChunkImpl()
           
 
Method Summary
 void bindFc(String clientItfName, Object serverItf)
           
 String getChunkName()
          Returns the name of added chunks.
 String getInetAddress()
          Returns the inet addresse put in chunks.
 int getPort()
          Returns the port number put in chunks.
 String[] listFc()
           
 void push(Message message, Map context)
           
 void setChunkName(String chunkName)
          Sets the name of the added chunk.
 void setInetAddress(String inetAddress)
          Sets the inet addresse put in chunks.
 void setPort(int port)
          Sets the port number put in chunks.
 void startFc()
           
 
Methods inherited from class org.objectweb.dream.AbstractComponent
getFcState, initComponent, lookupFc, setLogger, stopFc, unbindFc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messageManagerItf

protected MessageManager messageManagerItf
the message manager client interface of this component.


chunkName

protected String chunkName
the name of the IPChannelDestinationChunk added by this transformer.


inetAddress

protected InetAddress inetAddress
the inet address set in the chunk.


port

protected int port
the port set in the chunk.

Constructor Detail

BasicAddIPChannelSourceChunkImpl

public BasicAddIPChannelSourceChunkImpl()
Method Detail

push

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

getChunkName

public String getChunkName()
Description copied from interface: AddIPChannelAttributeController
Returns the name of added chunks.

Specified by:
getChunkName in interface AddIPChannelAttributeController
Returns:
the name of added chunks.
See Also:
AddIPChannelAttributeController.getChunkName()

setChunkName

public void setChunkName(String chunkName)
Description copied from interface: AddIPChannelAttributeController
Sets the name of the added chunk.

Specified by:
setChunkName in interface AddIPChannelAttributeController
Parameters:
chunkName - the name of added chunks .
See Also:
AddIPChannelAttributeController.setChunkName(String)

getInetAddress

public String getInetAddress()
Description copied from interface: AddIPChannelAttributeController
Returns the inet addresse put in chunks.

Specified by:
getInetAddress in interface AddIPChannelAttributeController
Returns:
a string representation of the inet addresse put in chunks.
See Also:
AddIPChannelAttributeController.getInetAddress()

setInetAddress

public void setInetAddress(String inetAddress)
                    throws UnknownHostException
Description copied from interface: AddIPChannelAttributeController
Sets the inet addresse put in chunks.

Specified by:
setInetAddress in interface AddIPChannelAttributeController
Parameters:
inetAddress - a String representing the inet addresse put in chunks.
Throws:
UnknownHostException - if the given inet address can't be resolved
See Also:
AddIPChannelAttributeController.setInetAddress(String)

getPort

public int getPort()
Description copied from interface: AddIPChannelAttributeController
Returns the port number put in chunks.

Specified by:
getPort in interface AddIPChannelAttributeController
Returns:
the port number put in chunks.
See Also:
AddIPChannelAttributeController.getPort()

setPort

public void setPort(int port)
Description copied from interface: AddIPChannelAttributeController
Sets the port number put in chunks.

Specified by:
setPort in interface AddIPChannelAttributeController
Parameters:
port - the port number put in chunks.
See Also:
AddIPChannelAttributeController.setPort(int)

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
Throws:
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
See Also:
BindingController.bindFc(String, Object)

startFc

public void startFc()
             throws IllegalLifeCycleException
Specified by:
startFc in interface LifeCycleController
Throws:
IllegalLifeCycleException
See Also:
LifeCycleController.startFc()


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