Package com.swiftmq.mgmt
Class EntityList
java.lang.Object
com.swiftmq.mgmt.Entity
com.swiftmq.mgmt.EntityList
- All Implemented Interfaces:
Dumpable
- Direct Known Subclasses:
RouterConfigInstance
A EntityList object that extends Entity. The difference is that the EntityList
supports the dynamic addition/removal of sub-entities. It also owns an Entity
template to creates predefined sub-entities.
- Author:
- IIT GmbH, Bremen/Germany, Copyright (c) 2000-2002, All Rights Reserved
-
Nested Class Summary
Nested classes/interfaces inherited from class com.swiftmq.mgmt.Entity
Entity.CloneableMap
-
Field Summary
FieldsFields inherited from class com.swiftmq.mgmt.Entity
factory, SET_COMMAND
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Creates a new EntityList.EntityList
(String name, String displayName, String description, String state, Entity template, boolean autoCreateNewDel) Creates a new EntityList.EntityList
(String name, String displayName, String description, String state, Entity template, boolean rebootOnNew, boolean rebootOnDel) Creates a new EntityList. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Creates the commands out of the command registry.Creates a new Entity from the template.int
Returns a unique dump id for this object.Returns the template for new sub-entities.void
readContent
(DataInput in) Read the content of this object from the stream.void
setEntityAddListener
(EntityAddListener entityAddListener) Set the EntityAddListener.void
setEntityRemoveListener
(EntityRemoveListener entityRemoveListener) Set the EntityRemoveListener.toJson()
toString()
void
writeContent
(DataOutput out) Write the content of this object to the stream.Methods inherited from class com.swiftmq.mgmt.Entity
addCommand, addEntity, addEntityWatchListener, addProperty, commandIncluded, createCopy, getCommandRegistry, getContext, getDescription, getDisplayContext, getDisplayName, getDynamicObject, getDynamicPropNames, getEntities, getEntity, getEntityAddListener, getEntityNames, getEntityRemoveListener, getIcon, getName, getParent, getProperties, getProperty, getState, getUserObject, isDynamic, isSetParent, isUpgrade, notifyEntityWatchListeners, quote, readDump, readDumpByteArray, readDumpDumpable, readDumpDumpableEntityMap, readDumpDumpablePropMap, readDumpStringArray, removeCommand, removeDynamicEntity, removeEntities, removeEntity, removeEntityWatchListener, removeProperty, setDynamic, setDynamicObject, setDynamicPropNames, setImageArray, setName, setParent, setState, setUpgrade, setUserObject, writeDump, writeDump, writeDump, writeDump, writeDump
-
Field Details
-
NEW_COMMAND
- See Also:
-
DEL_COMMAND
- See Also:
-
-
Constructor Details
-
EntityList
public EntityList(String name, String displayName, String description, String state, Entity template, boolean rebootOnNew, boolean rebootOnDel) Creates a new EntityList.- Parameters:
name
- name.displayName
- display name.description
- description.state
- not used yet.template
- the template for new sub-entities.rebootOnNew
- states whether an addition is only active after reboot.rebootOnDel
- states whether a removal is only active after reboot.
-
EntityList
public EntityList(String name, String displayName, String description, String state, Entity template) Creates a new EntityList.- Parameters:
name
- name.displayName
- display name.description
- description.state
- not used yet.template
- the template for new sub-entities.
-
EntityList
public EntityList(String name, String displayName, String description, String state, Entity template, boolean autoCreateNewDel) Creates a new EntityList.- Parameters:
name
- name.displayName
- display name.description
- description.state
- not used yet.template
- the template for new sub-entities.autoCreateNewDel
- automatically create new/delete commands.
-
EntityList
protected EntityList()
-
-
Method Details
-
getDumpId
public int getDumpId()Description copied from interface:Dumpable
Returns a unique dump id for this object. -
writeContent
Description copied from interface:Dumpable
Write the content of this object to the stream.- Specified by:
writeContent
in interfaceDumpable
- Overrides:
writeContent
in classEntity
- Parameters:
out
- output stream- Throws:
IOException
- if an error occurs
-
readContent
Description copied from interface:Dumpable
Read the content of this object from the stream.- Specified by:
readContent
in interfaceDumpable
- Overrides:
readContent
in classEntity
- Parameters:
in
- input stream- Throws:
IOException
- if an error occurs
-
createEntity
Creates a new Entity from the template.- Returns:
- new entity.
-
createCommands
public void createCommands()Description copied from class:Entity
Creates the commands out of the command registry. Normally, this is performed automatically, except for dynamic entities.- Overrides:
createCommands
in classEntity
- See Also:
-
getTemplate
Returns the template for new sub-entities.- Returns:
- template.
-
setEntityAddListener
Description copied from class:Entity
Set the EntityAddListener. There can only be 1 EntityAddListener which is responsible to verify the addition and may be throw an EntityAddException.- Overrides:
setEntityAddListener
in classEntity
- Parameters:
entityAddListener
- listener.
-
setEntityRemoveListener
Description copied from class:Entity
Set the EntityRemoveListener. There can only be 1 EntityRemoveListener which is responsible to verify the removal and may be throw an EntityRemoveException.- Overrides:
setEntityRemoveListener
in classEntity
- Parameters:
entityRemoveListener
- listener.
-
toJson
-
toString
-