org.objectweb.dream.protocol.messagePassing
Class FragmentationProtocolImpl

java.lang.Object
  extended by org.objectweb.dream.AbstractComponent
      extended by org.objectweb.dream.protocol.messagePassing.FragmentationProtocolImpl
All Implemented Interfaces:
ContextualBindingController, NeedAsyncStartController, PrepareStopLifeCycleController, Loggable, FragmentationAttributeController, MessagePassingProtocol, Protocol, AttributeController, BindingController, LifeCycleController

public class FragmentationProtocolImpl
extends AbstractComponent
implements FragmentationAttributeController, MessagePassingProtocol

Fragmentation protocol. Fragments outgoing messages, and reassemble incoming fragmented messages. Outgoing messages should contain only a ByteArrayChunk, additional chunks will not be present in the reassembled message.


Nested Class Summary
protected  class FragmentationProtocolImpl.Session
           
 
Field Summary
protected  int fragmentationSize
           
protected  MessagePassingProtocol lowerLevelProtocolItf
           
protected  MessageManager messageManagerItf
           
 
Fields inherited from class org.objectweb.dream.AbstractComponent
bindingLogger, fcNeedAsyncStart, fcState, lifeCycleLogger, logger, weaveableC
 
Fields inherited from interface org.objectweb.dream.protocol.messagePassing.MessagePassingProtocol
FROM_CHUNK_NAME
 
Fields inherited from interface org.objectweb.dream.protocol.Protocol
ITF_NAME, LOWER_PROTOCOL_ITF_NAME
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
FragmentationProtocolImpl()
           
 
Method Summary
 void bindFc(String clientItfName, Object serverItf)
           
 ExportIdentifier createExportIdentifier(Map<String,Object> info, ExportIdentifier[] next)
          Creates a new export identifier with the provided info
 MessagePassingOutgoingPush export(IncomingPush incomingPushItf, Map<String,Object> hints)
          Creates an access point and returns an interface that can be used to send messages through it.
 int getFragmentationSize()
          Returns the fragmentationSize attribute value.
 String[] listFc()
           
 void setFragmentationSize(int fragSize)
          Sets the fragmentation size.
 
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

fragmentationSize

protected int fragmentationSize

lowerLevelProtocolItf

protected MessagePassingProtocol lowerLevelProtocolItf

messageManagerItf

protected MessageManager messageManagerItf
Constructor Detail

FragmentationProtocolImpl

public FragmentationProtocolImpl()
Method Detail

export

public MessagePassingOutgoingPush export(IncomingPush incomingPushItf,
                                         Map<String,Object> hints)
                                  throws ExportException
Description copied from interface: MessagePassingProtocol
Creates an access point and returns an interface that can be used to send messages through it. Messages received on this access point will be passed to the given IncomingPush interface.

Specified by:
export in interface MessagePassingProtocol
Parameters:
incomingPushItf - the interface on which message received on the created access point will be passed, may be null.
hints - additional parameters, can be null.
Returns:
an interface which can be used to send messages through the created access point
Throws:
ExportException - if the export process fails.
See Also:
MessagePassingProtocol.export(IncomingPush, Map)

createExportIdentifier

public ExportIdentifier createExportIdentifier(Map<String,Object> info,
                                               ExportIdentifier[] next)
                                        throws InvalidExportIdentifierException
Description copied from interface: Protocol
Creates a new export identifier with the provided info

Specified by:
createExportIdentifier in interface Protocol
Parameters:
info - the info used to create the export identifier.
next - the export identifier of the lower level protocols.
Returns:
a new export identifier.
Throws:
InvalidExportIdentifierException - if the export identifier can't be created.
See Also:
Protocol.createExportIdentifier(Map, ExportIdentifier[])

getFragmentationSize

public int getFragmentationSize()
Description copied from interface: FragmentationAttributeController
Returns the fragmentationSize attribute value.

Specified by:
getFragmentationSize in interface FragmentationAttributeController
Returns:
the fragmentationSize attribute value.
See Also:
FragmentationAttributeController.getFragmentationSize()

setFragmentationSize

public void setFragmentationSize(int fragSize)
Description copied from interface: FragmentationAttributeController
Sets the fragmentation size.

Specified by:
setFragmentationSize in interface FragmentationAttributeController
Parameters:
fragSize - the fragmentationSize attribute value to set.
See Also:
FragmentationAttributeController.setFragmentationSize(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
Overrides:
bindFc in class AbstractComponent
Throws:
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
See Also:
BindingController.bindFc(String, Object)


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