org.objectweb.dream.message
Class ChunkTypeImpl

java.lang.Object
  extended byorg.objectweb.dream.message.ChunkTypeImpl
All Implemented Interfaces:
ChunkType, Externalizable, Recyclable, Serializable

public class ChunkTypeImpl
extends Object
implements ChunkType, Recyclable, Externalizable

Basic implementation of ChunkType interface

See Also:
Serialized Form

Constructor Summary
ChunkTypeImpl()
          Default constructor.
ChunkTypeImpl(Class chunkItf, Class chunkImpl)
          Creates a new Chunk type by specifying the class object of the interface provided by chunks of this type
ChunkTypeImpl(String itfSignature, String implSignature)
          Creates a new chunk type.
 
Method Summary
 Class getChunkImpl()
          Returns the Class object implementing the chunk interface.
 Class getChunkItf()
          Returns the Class object corresponding to the signature of this chunk type
 String getChunkSignature()
          Returns the signatures of the methods provided by chunks of this type.
 boolean isSubTypeOf(ChunkType t)
          Returns true if this chunk type if a sub type of the given chunk type.
 void readExternal(ObjectInput in)
           
 void recycle()
          Recycles the object.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChunkTypeImpl

public ChunkTypeImpl()
Default constructor. Used by object pool and codec.


ChunkTypeImpl

public ChunkTypeImpl(String itfSignature,
                     String implSignature)
              throws ClassNotFoundException
Creates a new chunk type.

Parameters:
itfSignature - the signature of this chunk type
implSignature - the signature of the chunk implementation
Throws:
ClassNotFoundException - if the the class corresponding to the signature cannot be found.
IllegalArgumentException - if the specified signature does not correspond to an interface.

ChunkTypeImpl

public ChunkTypeImpl(Class chunkItf,
                     Class chunkImpl)
Creates a new Chunk type by specifying the class object of the interface provided by chunks of this type

Parameters:
chunkItf - class object of the interface provided by chunks of this type
chunkImpl - class object of the implementation of the chunk.
Throws:
IllegalArgumentException - if the specified class object does not designate an interface.
Method Detail

getChunkSignature

public String getChunkSignature()
Description copied from interface: ChunkType
Returns the signatures of the methods provided by chunks of this type. In Java this method returns the fully qualified name of a Java interface corresponding to these method signatures.

Specified by:
getChunkSignature in interface ChunkType
Returns:
the signatures of the methods provided by chunks of this type.
See Also:
ChunkType.getChunkSignature()

isSubTypeOf

public boolean isSubTypeOf(ChunkType t)
Description copied from interface: ChunkType
Returns true if this chunk type if a sub type of the given chunk type.

Specified by:
isSubTypeOf in interface ChunkType
Parameters:
t - a chunk type
Returns:
true if this chunk type if a sub type of the given chunk type.
See Also:
ChunkType.isSubTypeOf(ChunkType)

getChunkItf

public Class getChunkItf()
Returns the Class object corresponding to the signature of this chunk type

Returns:
the Class object corresponding to the signature of this chunk type

getChunkImpl

public Class getChunkImpl()
Returns the Class object implementing the chunk interface.

Returns:
the Class object implementing the chunk interface.

recycle

public void recycle()
Description copied from interface: Recyclable
Recycles the object. This consists in reseting all the fields of the object.

Specified by:
recycle in interface Recyclable
See Also:
Recyclable.recycle()

readExternal

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

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException
See Also:
Externalizable.writeExternal(java.io.ObjectOutput)


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