org.objectweb.dream.protocol.messagePassing
Class FragmentationChunk

java.lang.Object
  extended by org.objectweb.dream.message.AbstractChunk<FragmentationChunk>
      extended by org.objectweb.dream.protocol.messagePassing.FragmentationChunk
All Implemented Interfaces:
Externalizable, Serializable, Recyclable

public class FragmentationChunk
extends AbstractChunk<FragmentationChunk>

Chunk for fragmented messages.

See Also:
Serialized Form

Field Summary
static String DEFAULT_NAME
          The default name for chunks of this type
 
Constructor Summary
FragmentationChunk()
           
 
Method Summary
static String filterChunkName(String chunkName)
          If the given chunkName is equal to the default name returns DEFAULT_NAME, otherwise returns the given string.
 int getFragmentationId()
          Returns the fragmentation id.
 int getFragmentId()
          Returns the id of this fragment.
 ExportIdentifier getFramentFrom()
          Returns the identifier of the sender of the fragment.
 int getNumFrags()
          Returns the number of fragments that make the message this fragment is part of.
 FragmentationChunk newChunk()
           
 void readExternal(ObjectInput in)
           
 void recycle()
           
 void setFragmentationId(int id)
          Sets the fragmentation id.
 void setFragmentId(int fragId)
          Sets the fragment's id.
 void setFramentFrom(ExportIdentifier framentFrom)
          Sets the identifier of the sender of the fragment.
 void setNumFrags(int numFrags)
          Sets the number of fragments that make the message this fragment is part of.
 String toString()
           
 void transfertStateTo(FragmentationChunk newInstance)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class org.objectweb.dream.message.AbstractChunk
getReference, setReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_NAME

public static final String DEFAULT_NAME
The default name for chunks of this type

See Also:
Constant Field Values
Constructor Detail

FragmentationChunk

public FragmentationChunk()
Method Detail

getFramentFrom

public ExportIdentifier getFramentFrom()
Returns the identifier of the sender of the fragment.

Returns:
the identifier of the sender of the fragment.

setFramentFrom

public void setFramentFrom(ExportIdentifier framentFrom)
Sets the identifier of the sender of the fragment.

Parameters:
framentFrom - the identifier of the sender of the fragment.

getFragmentId

public final int getFragmentId()
Returns the id of this fragment.

Returns:
the id of this fragment.

setFragmentId

public final void setFragmentId(int fragId)
Sets the fragment's id.

Parameters:
fragId - the id to set.

getFragmentationId

public final int getFragmentationId()
Returns the fragmentation id.

Returns:
the fragmentation id.

setFragmentationId

public final void setFragmentationId(int id)
Sets the fragmentation id.

Parameters:
id - the id to set.

getNumFrags

public final int getNumFrags()
Returns the number of fragments that make the message this fragment is part of.

Returns:
the number of fragments.

setNumFrags

public final void setNumFrags(int numFrags)
Sets the number of fragments that make the message this fragment is part of.

Parameters:
numFrags - the number of fragments to set.

transfertStateTo

public void transfertStateTo(FragmentationChunk newInstance)
Specified by:
transfertStateTo in class AbstractChunk<FragmentationChunk>
See Also:
AbstractChunk.transfertStateTo(AbstractChunk)

newChunk

public FragmentationChunk newChunk()
Specified by:
newChunk in class AbstractChunk<FragmentationChunk>
See Also:
AbstractChunk.newChunk()

recycle

public void recycle()
See Also:
Recyclable.recycle()

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Throws:
IOException
See Also:
Externalizable.writeExternal(ObjectOutput)

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Throws:
IOException
ClassNotFoundException
See Also:
Externalizable.readExternal(ObjectInput)

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

filterChunkName

public static String filterChunkName(String chunkName)
If the given chunkName is equal to the default name returns DEFAULT_NAME, otherwise returns the given string.

Parameters:
chunkName - the chunk name to filter.
Returns:
DEFAULT_NAMEor the given chunkName.


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