|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BlueprintManager
Caution: this class is normally internal to a ServiceBlock and not explicitly instantiated. The correct
way to acquire a BPM object reference is via the ServiceBlockAdmin API.
BlueprintManager bpm = theServiceBlock.getBlueprintMgr();
This is the primary API for maintaining detailed runtime meta-data that reflects the current
state of the Service Graph which is maintained in the Service Directory. This will include runtime
information stored in blueprints that comes from action docs, annotations and other sources.
The ServiceBlock works from "blueprints" that specify how to build each service along with binding
instructions for implementations. The BlueprintManager is responsible for maintaining this blueprint
'meta' model that represents a synchronized view of the object model in the Service Directory. While
most other container technology tends to throw this information away once the model is built, Surinam
preserves most of the original blueprint information and extends it through updates that are driven from
the encapsulating Service Block. Since the service model is an abstraction of the Service Graph, should
the graph be reshaped at runtime, the blueprint meta-model will no longer be in synch. When this happens
the Blueprint Manager will receive instructions to add services or to perform other mapping changes.
For implemenation mapping changes, it becomes simpler to wait until all the mapping changes have been made
to the Service Graph and then call 'synchronizeBindings' which brings the meta-model to parity.
The BPM also offers the ability to fully describe its meta-model, in the most portable and descriptive format
available, which means an Action Document. To restate this point, the BPM has the ability to use all that
stored information to generate a fully-formed Action Document that fully represents the current organizational
state of the Service Graph. This document can then be persisted, broadcast or otherwise reused to restore
the organizational state of the SB.
synchronizeBindings(com.codemonster.surinam.export.framework.ServiceBlockAdmin),
ServiceBlock,
ServiceBlockCommander| Method Summary | |
|---|---|
boolean |
isRegisteredContract(String contractName)
Tells whether a contract is registered with the manager. |
boolean |
isRegisteredEntryPoint(String contractName)
Tells whether a contract is registered with the manager. |
boolean |
isRegisteredImplementation(String contractName)
Tells whether a contract is registered with the manager. |
void |
registerEntryPoint(EntryPointBlueprint blueprint)
Registers an entry point with the BPM. |
void |
registerProviderImplementation(ImplementationBlueprint blueprint)
Registers an implementation with the BPM. |
void |
registerServiceContract(ContractBlueprint blueprint)
Registers a Contract with the BPM. |
String |
renderActionDocument()
This method is a primary format since the XML it delivers is actually a valid Action Document that can be fed back into a Service Block via a ServiceBlockCommander. |
void |
reset()
This method causes the manager to flush its mappings and reset to the state it was in when first created. |
void |
retireImplementation(String contractName)
This directive will remove a Service Provider Implementation from the manager. |
void |
retireServiceContract(String contractName)
This directive will remove a Service Contract from the manager. |
void |
synchronizeBindings(ServiceBlockAdmin serviceBlockAdmin)
Rather than try to maintain synchronization with the Service Directory for every change to the block (made even more complicated by implementation binding changes), we take the administrative interface for the Service Block and reconcile the service directory state with the blueprints from the BPM, bringing the meta-model into parity with the Service Graph and the Service Block. |
String |
toHTML()
Instructs the Blueprint Manager to return its current state as an HTML-formatted document. |
| Method Detail |
|---|
void registerServiceContract(ContractBlueprint blueprint)
blueprint - The blueprint to be registered with the BPM.void retireServiceContract(String contractName)
contractName - Name of the contract to be retired.void retireImplementation(String contractName)
contractName - Name of the Implementation to be removed.void registerEntryPoint(EntryPointBlueprint blueprint)
blueprint - The blueprint to be registered with the BPM.void registerProviderImplementation(ImplementationBlueprint blueprint)
blueprint - The blueprint to be registered with the BPM.boolean isRegisteredEntryPoint(String contractName)
contractName - The name of the contract being queried.
boolean isRegisteredContract(String contractName)
contractName - The name of the contract being queried.
boolean isRegisteredImplementation(String contractName)
contractName - The name of the contract being queried.
void synchronizeBindings(ServiceBlockAdmin serviceBlockAdmin)
throws ClassNotFoundException
serviceBlockAdmin - The service directory admin instance to synchronize against.
ClassNotFoundException - Thrown if there is a processing failure.String renderActionDocument()
ServiceBlockCommanderString toHTML()
void reset()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||