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
  • Field Details

  • 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.
      Specified by:
      getDumpId in interface Dumpable
      Overrides:
      getDumpId in class Entity
      Returns:
      unique dump id
    • writeContent

      public void writeContent(DataOutput out) throws IOException
      Description copied from interface: Dumpable
      Write the content of this object to the stream.
      Specified by:
      writeContent in interface Dumpable
      Overrides:
      writeContent in class Entity
      Parameters:
      out - output stream
      Throws:
      IOException - if an error occurs
    • readContent

      public void readContent(DataInput in) throws IOException
      Description copied from interface: Dumpable
      Read the content of this object from the stream.
      Specified by:
      readContent in interface Dumpable
      Overrides:
      readContent in class Entity
      Parameters:
      in - input stream
      Throws:
      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 class Entity
      See Also:
    • 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 class Entity
      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 class Entity
      Parameters:
      entityRemoveListener - listener.
    • toJson

      public String toJson()
      Overrides:
      toJson in class Entity
    • toString

      public String toString()
      Overrides:
      toString in class Entity