public interface ManagedObjectSource<D extends Enum<D>,F extends Enum<F>>
Source to obtain a particular type of ManagedObject
.
Implemented by the ManagedObject
provider.
Modifier and Type | Method and Description |
---|---|
ManagedObjectSourceMetaData<D,F> |
getMetaData()
Obtains the meta-data to describe this.
|
ManagedObjectSourceSpecification |
getSpecification()
Obtains the specification for this.
|
void |
init(ManagedObjectSourceContext<F> context)
Called only once after the
ManagedObjectSource is instantiated. |
void |
sourceManagedObject(ManagedObjectUser user)
Sources a
ManagedObject from this ManagedObjectSource . |
void |
start(ManagedObjectExecuteContext<F> context)
Called once after
init(ManagedObjectSourceContext) to indicate
this ManagedObjectSource should start execution. |
void |
stop()
Called to notify that the
OfficeFloor is being closed. |
ManagedObjectSourceSpecification getSpecification()
Obtains the specification for this.
This will be called before any other methods, therefore this method must be able to return the specification immediately after a default constructor instantiation.
void init(ManagedObjectSourceContext<F> context) throws Exception
ManagedObjectSource
is instantiated.context
- ManagedObjectSourceContext
to use in initialising.Exception
- Should the ManagedObjectSource
fail to configure
itself from the input properties.ManagedObjectSourceMetaData<D,F> getMetaData()
Obtains the meta-data to describe this.
This is called after the init(ManagedObjectSourceContext)
method
and therefore may use the configuration.
This should always return non-null. If there is a problem due to
incorrect configuration, the init(ManagedObjectSourceContext)
should indicate this via an exception.
void start(ManagedObjectExecuteContext<F> context) throws Exception
Called once after init(ManagedObjectSourceContext)
to indicate
this ManagedObjectSource
should start execution.
On invocation of this method, ProcessState
instances may be
invoked via the ManagedObjectExecuteContext
.
context
- ManagedObjectExecuteContext
to use in starting this
ManagedObjectSource
.Exception
- Should the ManagedObjectSource
fail to start
execution.void sourceManagedObject(ManagedObjectUser user)
ManagedObject
from this ManagedObjectSource
.user
- ManagedObjectUser
interested in using the
ManagedObject
.void stop()
Called to notify that the OfficeFloor
is being closed.
On return from this method, no further ProcessState
instances may
be invoked.
Copyright © 2005–2016. All rights reserved.