|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.universAAL.middleware.bus.member.BusMember org.universAAL.middleware.bus.member.Callee org.universAAL.middleware.service.ServiceCallee
public abstract class ServiceCallee
This is an abstract class that the service callee members of the service bus must derive from. According to the convention of the service bus regarding the registration parameters the
ServiceCallee
-s may pass an
array of
ServiceProfile
s
Field Summary |
---|
Fields inherited from class org.universAAL.middleware.bus.member.BusMember |
---|
busResourceURI, owner, theBus |
Constructor Summary | |
---|---|
protected |
ServiceCallee(ModuleContext context,
ServiceProfile[] realizedServices)
The default constructor for this class. |
Method Summary | |
---|---|
protected void |
addNewServiceProfiles(ServiceProfile[] realizedServices)
Registers additional services to be provided by this ServiceCalee . |
void |
busDyingOut(AbstractBus b)
This method is called when the bus is stopped to announce this to the bus members. |
abstract void |
communicationChannelBroken()
This abstract method is called for each member of the bus when the bus is being stopped. |
String |
getMyID()
Get the ID of this bus member. |
abstract ServiceResponse |
handleCall(ServiceCall call)
The actual service method of the ServiceCallee . |
void |
handleRequest(BusMessage m)
Handles a peer-to-peer request representing a ServiceCall coming
from the bus. |
protected void |
removeMatchingProfiles(ServiceProfile[] realizedServices)
Removes a specified set of services that were previously provided by this ServiceCalee . |
Methods inherited from class org.universAAL.middleware.bus.member.BusMember |
---|
close, getType, getURI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ServiceCallee(ModuleContext context, ServiceProfile[] realizedServices)
context
- The OSGI bundle context where the ServiceBus is registered.
Note that if no service bus is registered at the time of
creation, this object will not be operational.realizedServices
- The initial set of services that are realized by this callee.
NullPointerException
- if realizedServices is null or one of the elements of that
array is nullMethod Detail |
---|
protected final void addNewServiceProfiles(ServiceProfile[] realizedServices)
ServiceCalee
.
realizedServices
- the new services.
NullPointerException
- if realizedServices is null or one of the elements of that
array is nullprotected final void removeMatchingProfiles(ServiceProfile[] realizedServices)
ServiceCalee
.
realizedServices
- the services that need to be removed.public abstract void communicationChannelBroken()
public final void busDyingOut(AbstractBus b)
BusMember
busDyingOut
in class BusMember
b
- bus on which this member has been registeredBusMember.busDyingOut(AbstractBus)
public abstract ServiceResponse handleCall(ServiceCall call)
ServiceCallee
. It is called
by the bus whenever there is a call that need to be serviced by this
ServiceCallee
.
call
- the call that needs to be serviced.
public void handleRequest(BusMessage m)
ServiceCall
coming
from the bus.
m
- request message coming from the bus.public String getMyID()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |