|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.dream.AbstractComponent
org.objectweb.dream.message.manager.MessageManagerImpl
Basic implementation of a message manager.
Field Summary | |
static String |
CHUNK_POOL_COLLECTION_ITF_NAME
The name of the collection interface used to pool chunk instances |
protected Map |
chunkPoolItfs
|
static String |
EXTENSIBLE_MESSAGE_NC_POOL_OPT_ITF_NAME
The name of the optional client interface used to pool ExtensibleMessageNC instances. |
static String |
EXTENSIBLE_MESSAGE_POOL_OPT_ITF_NAME
The name of the optional client interface used to pool ExtensibleMessage instances. |
protected ObjectPool |
extensibleMessageNCPoolOptItf
|
protected ObjectPool |
extensibleMessagePoolOptItf
|
protected List |
unknownChunkPools
|
Fields inherited from class org.objectweb.dream.AbstractComponent |
bindingLogger, componentDesc, fcState, firstStart, lifeCycleLogger, logger, weaveableC |
Fields inherited from interface org.objectweb.dream.message.manager.MessageManager |
ITF_NAME |
Fields inherited from interface org.objectweb.dream.message.manager.MessageManagerAttributeController |
ITF_NAME |
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController |
STARTED, STOPPED |
Constructor Summary | |
MessageManagerImpl()
|
Method Summary | |
void |
bindFc(String clientItfName,
Object serverItf)
|
Object |
createChunk(ChunkType type)
Allocates and returns a chunk of the specified type. |
protected Chunk |
createChunkInstance(ChunkType chunkType)
|
protected ExtensibleMessage |
createExtensibleMessage()
|
protected ExtensibleMessageNC |
createExtensibleMessageNC()
|
Message |
createMessage(MessageType type)
Allocates and returns a message of the specified type. |
void |
deleteChunk(Object chunk)
Deletes a chunk. |
void |
deleteMessage(Message message)
Deletes a message. |
Object |
duplicateChunk(Object chunk,
boolean clone)
Duplicates a chunk. |
Message |
duplicateMessage(Message message,
boolean clone)
Duplicates a message. |
short |
getId()
Returns the manager's id. |
short |
getMessageManagerId()
Returns the message manager identifier. |
String[] |
listFc()
|
protected void |
recycleChunkInstance(Chunk chunk)
|
void |
setId(short id)
Sets the manager's id. |
void |
unbindFc(String clientItfName)
|
Methods inherited from class org.objectweb.dream.AbstractComponent |
beforeFirstStart, getFcState, initComponent, lookupFc, setLogger, startFc, stopFc |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String EXTENSIBLE_MESSAGE_POOL_OPT_ITF_NAME
ExtensibleMessage
instances.
public static final String EXTENSIBLE_MESSAGE_NC_POOL_OPT_ITF_NAME
ExtensibleMessageNC
instances.
public static final String CHUNK_POOL_COLLECTION_ITF_NAME
protected ObjectPool extensibleMessagePoolOptItf
protected ObjectPool extensibleMessageNCPoolOptItf
protected Map chunkPoolItfs
protected List unknownChunkPools
Constructor Detail |
public MessageManagerImpl()
Method Detail |
public Message createMessage(MessageType type) throws UnknownChunkTypeError
MessageManager
ExtensibleMessage
) or not.
createMessage
in interface MessageManager
type
- the type of the message to be created.
UnknownChunkTypeError
- if one of the chunk type in the message type
is unknown by the manager (see MessageManager.createChunk(ChunkType)
).MessageManager.createMessage(MessageType)
public void deleteMessage(Message message)
MessageManager
deleteMessage
in interface MessageManager
message
- the message to be deleted.MessageManager.deleteMessage(Message)
public Message duplicateMessage(Message message, boolean clone)
MessageManager
MessageManager.deleteMessage(Message)
operation only
deletes the message when all the duplicated references have been released
duplicateMessage
in interface MessageManager
message
- the message to be duplicated.clone
- the duplication mode. false
for reference
duplication, true
for value duplication.
MessageManager.duplicateMessage(Message, boolean)
public Object createChunk(ChunkType type) throws UnknownChunkTypeError
MessageManager
ChunkType
, so if the
requesed chunk type is unknown, a UnknownChunkTypeError
is thrown
createChunk
in interface MessageManager
type
- the type of the chunk to be created.
UnknownChunkTypeError
- if the chunk type can not be resolved by the
manager (cannot find implementation).MessageManager.createChunk(ChunkType)
public void deleteChunk(Object chunk)
MessageManager
deleteChunk
in interface MessageManager
chunk
- the chunk to delete.MessageManager.deleteChunk(Object)
public Object duplicateChunk(Object chunk, boolean clone)
MessageManager
MessageManager.duplicateMessage(Message, boolean)
).
duplicateChunk
in interface MessageManager
chunk
- the chunk to be duplicated.clone
- the duplication mode.
MessageManager.duplicateChunk(Object, boolean)
public short getMessageManagerId()
MessageManager
getMessageManagerId
in interface MessageManager
MessageManager.getMessageManagerId()
public short getId()
MessageManagerAttributeController
getId
in interface MessageManagerAttributeController
MessageManagerAttributeController.getId()
public void setId(short id)
MessageManagerAttributeController
setId
in interface MessageManagerAttributeController
id
- the id to set.MessageManagerAttributeController.setId(short)
protected final ExtensibleMessageNC createExtensibleMessageNC()
protected final ExtensibleMessage createExtensibleMessage()
protected final Chunk createChunkInstance(ChunkType chunkType)
protected final void recycleChunkInstance(Chunk chunk)
public void bindFc(String clientItfName, Object serverItf) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException
bindFc
in interface BindingController
bindFc
in class AbstractComponent
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
BindingController.bindFc(String,
Object)
public void unbindFc(String clientItfName) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException
unbindFc
in interface BindingController
unbindFc
in class AbstractComponent
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
BindingController.unbindFc(String)
public String[] listFc()
listFc
in interface BindingController
BindingController.listFc()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |