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
public class EntityList extends Entity
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.ClonableMap
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEL_COMMAND
static java.lang.String
NEW_COMMAND
-
Fields inherited from class com.swiftmq.mgmt.Entity
factory, SET_COMMAND
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
EntityList()
EntityList(java.lang.String name, java.lang.String displayName, java.lang.String description, java.lang.String state, Entity template)
Creates a new EntityList.EntityList(java.lang.String name, java.lang.String displayName, java.lang.String description, java.lang.String state, Entity template, boolean autoCreateNewDel)
Creates a new EntityList.EntityList(java.lang.String name, java.lang.String displayName, java.lang.String description, java.lang.String state, Entity template, boolean rebootOnNew, boolean rebootOnDel)
Creates a new EntityList.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createCommands()
Creates the commands out of the command registry.Entity
createEntity()
Creates a new Entity from the template.int
getDumpId()
Returns a unique dump id for this object.Entity
getTemplate()
Returns the template for new sub-entities.void
readContent(java.io.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.java.lang.String
toJson()
java.lang.String
toString()
void
writeContent(java.io.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 Detail
-
NEW_COMMAND
public static final java.lang.String NEW_COMMAND
- See Also:
- Constant Field Values
-
DEL_COMMAND
public static final java.lang.String DEL_COMMAND
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EntityList
public EntityList(java.lang.String name, java.lang.String displayName, java.lang.String description, java.lang.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(java.lang.String name, java.lang.String displayName, java.lang.String description, java.lang.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(java.lang.String name, java.lang.String displayName, java.lang.String description, java.lang.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 Detail
-
getDumpId
public int getDumpId()
Description copied from interface:Dumpable
Returns a unique dump id for this object.
-
writeContent
public void writeContent(java.io.DataOutput out) throws java.io.IOException
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:
java.io.IOException
- if an error occurs
-
readContent
public void readContent(java.io.DataInput in) throws java.io.IOException
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:
java.io.IOException
- if an error occurs
-
createEntity
public Entity 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:
EntityList
-
getTemplate
public Entity getTemplate()
Returns the template for new sub-entities.- Returns:
- template.
-
setEntityAddListener
public void setEntityAddListener(EntityAddListener entityAddListener)
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
public void setEntityRemoveListener(EntityRemoveListener entityRemoveListener)
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.
-
-