public class ProxySCallee extends ServiceCallee implements ProxyBusMember
ServiceCallee
, with its subscription parameters
synchronized, it is able to get the calls meant for the remote
ServiceCallee
and send them to the remote proxy which, in time, makes
sure a response from the actual ServiceCallee
is transmitted back.busResourceURI, owner, theBus
Constructor and Description |
---|
ProxySCallee(ModuleContext context,
ServiceProfile[] realizedServices) |
Modifier and Type | Method and Description |
---|---|
void |
addRemoteProxyReference(BusMemberReference remoteReference)
Add a
BusMemberReference to the proxy. |
void |
addSubscriptionParameters(Resource[] newParams)
When a update of registration parameters is required.
|
void |
communicationChannelBroken()
This abstract method is called for each member of the bus when the bus is
being stopped.
|
String |
getBusMemberId()
Get the busmemberId.
|
Collection<BusMemberReference> |
getRemoteProxiesReferences()
List all current references for this proxy.
|
Resource[] |
getSubscriptionParameters()
Get the subscription parameters of the
BusMember being proxied by
this proxy. |
ServiceResponse |
handleCall(ServiceCall call)
The actual service method of the
ServiceCallee . |
void |
handleMessage(Session session,
WrappedBusMessage busMessage)
When a session receives a
WrappedBusMessage , it delivers it to
the ProxyBusMember which its
busMemberId matches the
WrappedBusMessage's destination . |
boolean |
isCompatible(Resource[] registrationParameters)
Used to check if a
ProxyBusMember is capable of assuming the
proxy duties of a requested proxy with the given parameters. |
void |
removeRemoteProxyReference(BusMemberReference remoteReference)
Remove a concrete remote proxy.
|
void |
removeRemoteProxyReferences(Session session)
Disconnect from all references that use the same session.Does not send
Remove message |
void |
removeSubscriptionParameters(Resource[] newParams)
When a update of registration parameters is required.
|
addNewServiceProfiles, addNewServiceProfiles, busDyingOut, getMyID, handleRequest, removeMatchingProfiles
close, getComment, getLabel, getType, getURI, setComment, setLabel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public ProxySCallee(ModuleContext context, ServiceProfile[] realizedServices)
context
- realizedServices
- public void communicationChannelBroken()
communicationChannelBroken
in class ServiceCallee
public ServiceResponse handleCall(ServiceCall call)
ServiceCallee
. It is called
by the bus whenever there is a call that need to be serviced by this
ServiceCallee
.handleCall
in class ServiceCallee
call
- the call that needs to be serviced.public String getBusMemberId()
ProxyBusMember
BusMember
.getBusMemberId
in interface ProxyBusMember
public void addRemoteProxyReference(BusMemberReference remoteReference)
BusMemberReference
to the proxy. This means that from this
moment on the remote proxy and the local proxy can (and should)
communicate with each other. addRemoteProxyReference
in interface ProxyBusMember
remoteReference
- The reference to a remote proxy, its busmemberid and the
session through which to find it.public void removeRemoteProxyReference(BusMemberReference remoteReference)
Remove message
removeRemoteProxyReference
in interface ProxyBusMember
remoteReference
- the remote's proxy reference to stop communicating with.public void removeRemoteProxyReferences(Session session)
Remove message
removeRemoteProxyReferences
in interface ProxyBusMember
session
- the session that is to be disconnected.public Collection<BusMemberReference> getRemoteProxiesReferences()
getRemoteProxiesReferences
in interface ProxyBusMember
public Resource[] getSubscriptionParameters()
BusMember
being proxied by
this proxy.getSubscriptionParameters
in interface ProxyBusMember
public void handleMessage(Session session, WrappedBusMessage busMessage)
ProxyBusMember
WrappedBusMessage
, it delivers it to
the ProxyBusMember
which its
busMemberId
matches the
WrappedBusMessage's destination
. The delivery is received through this
method.handleMessage
in interface ProxyBusMember
session
- the session through which the message was received.busMessage
- the actual message received.public boolean isCompatible(Resource[] registrationParameters)
ProxyBusMember
is capable of assuming the
proxy duties of a requested proxy with the given parameters. isCompatible
in interface ProxyBusMember
public void addSubscriptionParameters(Resource[] newParams)
addSubscriptionParameters
in interface ProxyBusMember
newParams
- the new parameters to use.public void removeSubscriptionParameters(Resource[] newParams)
removeSubscriptionParameters
in interface ProxyBusMember
newParams
- the new parameters to use.Copyright © 2018 universAAL Consortium. All rights reserved.