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.CloneableMap
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEL_COMMANDstatic java.lang.StringNEW_COMMAND-
Fields inherited from class com.swiftmq.mgmt.Entity
factory, SET_COMMAND
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedEntityList()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 voidcreateCommands()Creates the commands out of the command registry.EntitycreateEntity()Creates a new Entity from the template.intgetDumpId()Returns a unique dump id for this object.EntitygetTemplate()Returns the template for new sub-entities.voidreadContent(java.io.DataInput in)Read the content of this object from the stream.voidsetEntityAddListener(EntityAddListener entityAddListener)Set the EntityAddListener.voidsetEntityRemoveListener(EntityRemoveListener entityRemoveListener)Set the EntityRemoveListener.java.lang.StringtoJson()java.lang.StringtoString()voidwriteContent(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:DumpableReturns a unique dump id for this object.
-
writeContent
public void writeContent(java.io.DataOutput out) throws java.io.IOExceptionDescription copied from interface:DumpableWrite the content of this object to the stream.- Specified by:
writeContentin interfaceDumpable- Overrides:
writeContentin classEntity- Parameters:
out- output stream- Throws:
java.io.IOException- if an error occurs
-
readContent
public void readContent(java.io.DataInput in) throws java.io.IOExceptionDescription copied from interface:DumpableRead the content of this object from the stream.- Specified by:
readContentin interfaceDumpable- Overrides:
readContentin 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:EntityCreates the commands out of the command registry. Normally, this is performed automatically, except for dynamic entities.- Overrides:
createCommandsin 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:EntitySet the EntityAddListener. There can only be 1 EntityAddListener which is responsible to verify the addition and may be throw an EntityAddException.- Overrides:
setEntityAddListenerin classEntity- Parameters:
entityAddListener- listener.
-
setEntityRemoveListener
public void setEntityRemoveListener(EntityRemoveListener entityRemoveListener)
Description copied from class:EntitySet the EntityRemoveListener. There can only be 1 EntityRemoveListener which is responsible to verify the removal and may be throw an EntityRemoveException.- Overrides:
setEntityRemoveListenerin classEntity- Parameters:
entityRemoveListener- listener.
-
-