|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ServiceDirectoryAdmin
This is the administrative API for the ServiceDirectory. This API will allow you to completely manage contracts and implementations. Registration applies to Contracts and means to make it available in the ServiceDirectory and to assign it a default implementation. Retirement applies to Contracts and makes them no longer visible in the directory. Assignment applies to ProviderImplementations and takes the given ManagedService object and assigns it to one or more Contracts, thus making it available to be called from clients. Recall applies to ProviderImplementations which have been assigned to service contracts. Their assignment is said to be 'recinded' and they are recalled to where they came from.
First of all, there are no registered services that have no implementations; however, this simply means that when a service is registered, a default implementation is provided. Doing this causes the service to be known but unavailable.
ServiceDirectory| Method Summary | |
|---|---|
void |
activateService(Class serviceClassName)
This is an administrative request to the service implementation to come 'online'. |
boolean |
bindImplementation(Class className,
ManagedService impl)
Here, we store the given impl for this service interface. |
void |
deactivateService(Class serviceClassName)
This will be an administrative request to the service to deactiveate its implementation (i.e.'offline'). |
Set<Class> |
getAllServices()
This is an easy way to acquire the list of known services, including both Entry Points and Service Points. |
Object |
getProviderImplementation(VersionedProviderImplementationName versionedProviderImplementationName)
This method will allow external threads to build their own compound versionedProviderImplementationName that identifies a versioned implementation class and get a reference to that impl class. |
ManagedService |
getUnvalidatedService(Class clazz)
Like a 'staff only' doorway in a business, this is a "special case" accessor for a Managed Service in that it only throws an exception if the service is unknown. |
boolean |
isBoundImplementation(ManagedService managedService)
This method will scan the collection of held implementations to see if there's a match. |
void |
registerContractWithDefaultBinding(Class serviceName)
This is a simplified method that allows for the registration of just the contract definition which will be backed by a non-functional default implementation. |
void |
reset()
This method will cause the Service Directory to flush all its internal mappings and reset its state to what it was when it was first created. |
void |
retireContract(Class serviceName)
Retiring a contract means that it is removed from the directory, including releasing the organization implementation if there was one and it is not servicing any other contracts. |
void |
unbindServiceImplementation(Class serviceName)
Unbinding an implementation will set the given service to the default placeholder. |
| Method Detail |
|---|
void registerContractWithDefaultBinding(Class serviceName)
serviceName - This is the name of the fq class name to register as a software contract.void retireContract(Class serviceName)
serviceName - This is the fq class name of the contract to be removed from the directory.boolean isBoundImplementation(ManagedService managedService)
managedService - The instance being searched for.
boolean bindImplementation(Class className,
ManagedService impl)
throws ServiceBindingException
className - This is the class for the interface that defines the service contract.impl - This is the implementation instance for this interface which must extend the Adapter or
ServiceBindingException - Thrown if there is a problem
with the assignment.void unbindServiceImplementation(Class serviceName)
serviceName - The service class for the service point for which we wish to remove the impl.void activateService(Class serviceClassName)
serviceClassName - The contract that the impl was supposed to be supporting.void deactivateService(Class serviceClassName)
serviceClassName - This is the contract key class that points to the organization implementation to be
deactivated.
Object getProviderImplementation(VersionedProviderImplementationName versionedProviderImplementationName)
throws UnknownImplementationException
versionedProviderImplementationName - This is the key that will be used to indentify and acquire the
impl object.
UnknownImplementationException - Thrown if the key
doesn't match any known implementation.
ManagedService getUnvalidatedService(Class clazz)
throws UnknownServiceException
clazz - The class of the service you wish to acquire the implementation object for.
UnknownServiceException - Thrown if the service is not registered.Set<Class> getAllServices()
void reset()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||