net.officefloor.frame.spi.managedobject.source
Interface ManagedObjectSource<D extends Enum<D>,F extends Enum<F>>

All Known Implementing Classes:
AbstractAsyncManagedObjectSource, AbstractManagedObjectSource, AbstractServerSocketManagedObjectSource, AnonymousHttpAuthenticationManagedObjectSource, ClassManagedObjectSource, CometProxyPublisherManagedObjectSource, CometPublisherManagedObjectSource, CometRequestServicerManagedObjectSource, CometServiceManagedObjectSource, DataSourceManagedObjectSource, FlatXmlUnmarshallerManagedObjectSource, HttpApplicationLocationManagedObjectSource, HttpApplicationObjectManagedObjectSource, HttpApplicationStateManagedObjectSource, HttpAuthenticationManagedObjectSource, HttpParametersLoaderManagedObjectSource, HttpRequestObjectManagedObjectSource, HttpRequestStateManagedObjectSource, HttpSecurityManagedObjectAdapterSource, HttpSecurityManagedObjectSource, HttpServerSocketManagedObjectSource, HttpServletSecurityManagedObjectSource, HttpSessionAttributeManagedObjectSource, HttpSessionAttributeRetrieverManagedObjectSource, HttpSessionManagedObjectSource, HttpSessionObjectManagedObjectSource, HttpsServerSocketManagedObjectSource, JdbcManagedObjectSource, JmsManagedObjectSource, JmsServerManagedObjectSource, JndiContextManagedObjectSource, JndiDirContextManagedObjectSource, JndiLdapManagedObjectSource, JndiLdapManagedObjectSource, JndiObjectManagedObjectSource, JpaEntityManagerManagedObjectSource, JsonRequestReaderManagedObjectSource, JsonResponseWriterManagedObjectSource, ManagedObjectLoaderUtil.CollectMetaDataContextManagedObjectSource, MockCredentialStoreManagedObjectSource, MockManagedObjectSource, OfficeServletContextManagedObjectSource, PasswordFileManagedObjectSource, SectionClassManagedObjectSource, SecureTcpServerSocketManagedObjectSource, ServerGwtRpcConnectionManagedObjectSource, ServletBridgeManagedObjectSource, ServletDependencyManagedObjectSource, ServletHttpApplicationStateManagedObjectSource, ServletHttpRequestStateManagedObjectSource, ServletHttpSessionManagedObjectSource, ServletServerHttpConnectionManagedObjectSource, ServletServerManagedObjectSource, SingletonManagedObjectSource, StockPriceSimulatorManagedObjectSource, TcpServerSocketManagedObjectSource, TreeXmlMarshallerManagedObjectSource, TreeXmlUnmarshallerManagedObjectSource

public interface ManagedObjectSource<D extends Enum<D>,F extends Enum<F>>

Source to obtain a particular type of ManagedObject.

Implemented by the ManagedObject provider.

Author:
Daniel Sagenschneider

Method Summary
 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.
 

Method Detail

getSpecification

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.

Returns:
Specification of this.

init

void init(ManagedObjectSourceContext<F> context)
          throws Exception
Called only once after the ManagedObjectSource is instantiated.

Parameters:
context - ManagedObjectSourceContext to use in initialising.
Throws:
Exception - Should the ManagedObjectSource fail to configure itself from the input properties.

getMetaData

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.

Returns:
Meta-data to describe this.

start

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.

Parameters:
context - ManagedObjectExecuteContext to use in starting this ManagedObjectSource.
Throws:
Exception - Should the ManagedObjectSource fail to start execution.

sourceManagedObject

void sourceManagedObject(ManagedObjectUser user)
Sources a ManagedObject from this ManagedObjectSource.

Parameters:
user - ManagedObjectUser interested in using the ManagedObject.

stop

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-2013. All Rights Reserved.