Class ObjectUserImpl<O>

java.lang.Object
net.officefloor.frame.impl.execute.office.ObjectUserImpl<O>
All Implemented Interfaces:
ObjectUser<O>

public class ObjectUserImpl<O> extends Object implements ObjectUser<O>
ObjectUser implementation.
Author:
Daniel Sagenschneider
  • Constructor Details

    • ObjectUserImpl

      public ObjectUserImpl(String boundObjectName, MonitorClock monitorClock)
      Instantiate.
      Parameters:
      boundObjectName - Bound object name.
      monitorClock - MonitorClock.
  • Method Details

    • getObject

      public O getObject(long timeoutInMilliseconds) throws Throwable
      Obtains the object. This method will block until the object is available, a failure or time out waiting.
      Parameters:
      timeoutInMilliseconds - Time out in milliseconds to block waiting for object to become available.
      Returns:
      Object.
      Throws:
      Throwable - If fails to obtain the object.
    • use

      public void use(O object, Throwable failure)
      Description copied from interface: ObjectUser
      Provides the object for using.
      Specified by:
      use in interface ObjectUser<O>
      Parameters:
      object - Object for use.
      failure - Throwable if fails to load the Object.