All Packages Class Hierarchy This Package Previous Next Index
Interface tlk.service.ServiceActivator
- public abstract interface ServiceActivator
- extends Sandbox
This interfaces a service provider with the real
medium communication, hiding all communication details from the
service provider. It basically listens for service requests and
if the used SP plugin(s) offer one of the requested services it uses it
to perform that given service.
(subject to change !!!)
Note: Recommended usage is NOT to register too many (>5) service
providers with a single activator !!!
Written: Radu Sion
Version: 0.1
Source: ServiceActivator.java
Visit
Smart Software
-
registerServiceProvider(ServiceProvider)
-
This adds another service provider to this activator's pool of providers.
-
removeServiceProvider(ServiceProvider)
- This removes a registered service provider from the activator's pool of
providers.
-
startServiceActivator(Object)
- This method actually fires up the activator.
-
stopServiceActivator()
- This method should reverse the effect of startServiceActivator,
but gracefully.
registerServiceProvider
public abstract boolean registerServiceProvider(ServiceProvider sp)
- This adds another service provider to this activator's pool of providers.
It also adds the activator to certain interest groups according
to the getInterestGroups method.
If this returns false it means either that the activator is not started
and connected (yet) or that some other error occured. Also some exception
may be raised ...
- Parameters:
- sp - The new service provider to consider
- Returns:
- true if registration succeeded, false otherwise
removeServiceProvider
public abstract void removeServiceProvider(ServiceProvider sp)
- This removes a registered service provider from the activator's pool of
providers. It also exits certain communication groups which were related
ONLY to this particular service provider.
- Parameters:
- sp - The service provider to remove
startServiceActivator
public abstract boolean startServiceActivator(Object param)
- This method actually fires up the activator. The provided object may either
be ignored or contain maybe a parameter (serverid for example).
The ideea is that all other methods should return error codes BEFORE
this is used to start the activator. In the JVM case, the activator should
connect here to a serverid with a username and password (all of those
provided through a specific method, before the call to this one) and start
listening to requests. Service providers may register themselves only after
this method is called and returns true.
- Parameters:
- param - This Object may be used to pass parameters ...
- Returns:
- True if ok, false if error
stopServiceActivator
public abstract void stopServiceActivator()
- This method should reverse the effect of startServiceActivator,
but gracefully. For example if there are some transactions in progress
it should wait until they finish.
All Packages Class Hierarchy This Package Previous Next Index