|
||||||||||
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.PoolNonExtensibleMessageManagerImpl
This class provides an implementation of message managers for non extensible messages. It pools message instances.
The class of messages to be managed is given using the
NonExtensibleMessageManagerAttributeController
.
Field Summary |
Fields inherited from class org.objectweb.dream.AbstractComponent |
bindingLogger, componentDesc, fcState, 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 | |
PoolNonExtensibleMessageManagerImpl()
|
Method Summary | |
Object |
createChunk(ChunkType type)
Allocates and returns a chunk of the specified type. |
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. |
int |
getCapacity()
Returns the instance pool capacity. |
short |
getId()
Returns the manager's id. |
String |
getMessageClassName()
Returns the name of the class of non extensible messages that are managed by the manager to which this interface belongs. |
short |
getMessageManagerId()
Returns the message manager identifier. |
String[] |
listFc()
|
void |
setCapacity(int capacity)
Sets the instance pool capacity. |
void |
setId(short id)
Sets the manager's id. |
void |
setMessageClassName(String name)
Sets the name of the class of non extensible messages that are managed by the manager to which this interface belongs. |
Methods inherited from class org.objectweb.dream.AbstractComponent |
bindFc, getFcState, initComponent, lookupFc, setLogger, startFc, stopFc, unbindFc |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PoolNonExtensibleMessageManagerImpl()
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)
public int getCapacity()
PoolMessageManagerAttributeController
getCapacity
in interface PoolMessageManagerAttributeController
PoolMessageManagerAttributeController.getCapacity()
public void setCapacity(int capacity)
PoolMessageManagerAttributeController
setCapacity
in interface PoolMessageManagerAttributeController
capacity
- the instance pool capacity.PoolMessageManagerAttributeController.setCapacity(int)
public String getMessageClassName()
NonExtensibleMessageManagerAttributeController
getMessageClassName
in interface NonExtensibleMessageManagerAttributeController
NonExtensibleMessageManagerAttributeController.getMessageClassName()
public void setMessageClassName(String name)
NonExtensibleMessageManagerAttributeController
setMessageClassName
in interface NonExtensibleMessageManagerAttributeController
name
- the name of the class of messages.NonExtensibleMessageManagerAttributeController.setMessageClassName(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 |