Class Q2.QEntry

java.lang.Object
org.jpos.q2.Q2.QEntry
Enclosing class:
Q2

public static class Q2.QEntry extends Object
Bookkeeping record for a deployed QBean: when it was deployed, its JMX registration, the underlying object, and whether it should start eagerly.
  • Constructor Details

    • QEntry

      public QEntry()
      Creates an empty entry; fields are populated as deployment progresses.
    • QEntry

      public QEntry(long deployed, ObjectInstance instance)
      Creates an entry pre-populated with a deploy timestamp and JMX instance.
      Parameters:
      deployed - deploy timestamp in milliseconds since the epoch
      instance - JMX registration for the deployed QBean
  • Method Details

    • getDeployed

      public long getDeployed()
      Returns the deploy timestamp.
      Returns:
      deploy timestamp in milliseconds since the epoch
    • setDeployed

      public void setDeployed(long deployed)
      Updates the deploy timestamp.
      Parameters:
      deployed - deploy timestamp in milliseconds since the epoch
    • setInstance

      public void setInstance(ObjectInstance instance)
      Sets the JMX registration for the deployed QBean.
      Parameters:
      instance - JMX registration for the deployed QBean
    • getInstance

      Returns the JMX registration for the deployed QBean.
      Returns:
      JMX registration for the deployed QBean, or null if not yet registered
    • getObjectName

      Returns the ObjectName of the deployed QBean.
      Returns:
      the JMX ObjectName of the deployed QBean, or null if not registered
    • setObject

      public void setObject(Object obj)
      Binds the underlying QBean (or QPersist) instance.
      Parameters:
      obj - underlying QBean (or QPersist) instance
    • getObject

      public Object getObject()
      Returns the underlying QBean (or QPersist) instance.
      Returns:
      underlying QBean (or QPersist) instance, or null when not bound
    • isQBean

      public boolean isQBean()
      Returns whether the bound object implements QBean.
      Returns:
      true when the bound object implements QBean
    • isQPersist

      public boolean isQPersist()
      Returns whether the bound object implements QPersist.
      Returns:
      true when the bound object implements QPersist
    • isEagerStart

      public boolean isEagerStart()
      Returns whether this QBean is configured for eager start.
      Returns:
      true when this QBean should be started immediately on deploy
    • setEagerStart

      public void setEagerStart(boolean eagerStart)
      Sets whether this QBean should start immediately on deploy.
      Parameters:
      eagerStart - whether this QBean should be started immediately on deploy