SMILA 1.0 API documentation

org.eclipse.smila.blackboard.impl
Class BlackboardFactoryImpl

java.lang.Object
  extended by org.eclipse.smila.blackboard.impl.BlackboardFactoryImpl
All Implemented Interfaces:
BlackboardFactory

public class BlackboardFactoryImpl
extends java.lang.Object
implements BlackboardFactory

Author:
jschumacher

Constructor Summary
BlackboardFactoryImpl()
           
 
Method Summary
protected  void activate(ComponentContext context)
          
 Blackboard createBlackboard(boolean useRecordStorage, boolean useBinaryStorage)
          creates a blackboard.
 Blackboard createPersistingBlackboard()
          create a new persisting blackboard instance.
 Blackboard createTransientBlackboard()
          create a new non-persisting blackboard instance.
 void setBinaryStorage(BinaryStorageService binaryStorage)
          Set the binary service for blackboard.
 void setRecordStorage(RecordStorage recordStorage)
          Set the record service for blackboard.
 void unsetBinaryStorage(BinaryStorageService binaryStorage)
          Un-set the binary storage service.
 void unsetRecordStorage(RecordStorage recordStorage)
          Un-set the record storage service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlackboardFactoryImpl

public BlackboardFactoryImpl()
Method Detail

createBlackboard

public Blackboard createBlackboard(boolean useRecordStorage,
                                   boolean useBinaryStorage)
                            throws BlackboardAccessException
creates a blackboard.

Specified by:
createBlackboard in interface BlackboardFactory
Parameters:
useRecordStorage - if true, the records will be stored using the RecordStorage service.
useBinaryStorage - if true, the attachments will be stored using the BinaryStorage service.
Returns:
a blackboard with the desired storages attached to it.
Throws:
BlackboardAccessException - could not create the blackboard, or one of the desired services is not available.

createPersistingBlackboard

public Blackboard createPersistingBlackboard()
                                      throws BlackboardAccessException
create a new persisting blackboard instance. If a record storage is available, it will be used. The Blackboard uses a binary storage to store attachments.

Specified by:
createPersistingBlackboard in interface BlackboardFactory
Returns:
blackboard instance that does persist into storages.
Throws:
BlackboardAccessException - could not create the blackboard, or no binary storage service is available.

createTransientBlackboard

public Blackboard createTransientBlackboard()
create a new non-persisting blackboard instance. This method must always return a valid empty blackboard instance.

Specified by:
createTransientBlackboard in interface BlackboardFactory
Returns:
blackboard instance that does not persist into storages.

activate

protected void activate(ComponentContext context)


setRecordStorage

public void setRecordStorage(RecordStorage recordStorage)
Set the record service for blackboard. To be used by Declarative Services as the bind method.

Parameters:
recordStorage - RecordStorage - the record storage service interface

unsetRecordStorage

public void unsetRecordStorage(RecordStorage recordStorage)
Un-set the record storage service. To be used by Declarative Services as the un-bind method.

Parameters:
recordStorage - RecordStorage - the record storage service interface

setBinaryStorage

public void setBinaryStorage(BinaryStorageService binaryStorage)
Set the binary service for blackboard. To be used by Declarative Services as the bind method.

Parameters:
binaryStorage - BinaryStorageService - the binary storage service interface

unsetBinaryStorage

public void unsetBinaryStorage(BinaryStorageService binaryStorage)
Un-set the binary storage service. To be used by Declarative Services as the un-bind method.

Parameters:
binaryStorage - -

SMILA 1.0 API documentation