Class ExitAgent

All Implemented Interfaces:
ExternalizableLite, Invocable, InvocableInOrder, PriorityTask, Serializable, Runnable

public class ExitAgent extends AbstractInvocable implements ExternalizableLite
This agent is used to request the other servers in the cluster to unlock the specified session ID.

Note: This must be a static class, for serialization purposes. Were it not static, it would "drag" the entire session collection with it across the cluster.

See Also:
  • Constructor Details

    • ExitAgent

      public ExitAgent()
      Default constructor.
    • ExitAgent

      public ExitAgent(String sId)
      Construct an ExitAgent to unlock a specific session.
      Parameters:
      sId - the id of the session that needs to be unlocked
  • Method Details

    • run

      public void run()
      This method is invoked when the agent is run on the various servers in the cluster. It unlocks the session (or specifies that it should be unlocked when exited.)
      Specified by:
      run in interface Invocable
      Specified by:
      run in interface Runnable
    • readExternal

      public void readExternal(DataInput in) throws IOException
      Restore the contents of this object by loading the object's state from the passed DataInput object.
      Specified by:
      readExternal in interface ExternalizableLite
      Parameters:
      in - the DataInput stream to read data from in order to restore the state of this object
      Throws:
      IOException - if an I/O exception occurs
    • writeExternal

      public void writeExternal(DataOutput out) throws IOException
      Save the contents of this object by storing the object's state into the passed DataOutput object.
      Specified by:
      writeExternal in interface ExternalizableLite
      Parameters:
      out - the DataOutput stream to write the state of this object to
      Throws:
      IOException - if an I/O exception occurs