
public class Exporter extends Object implements IBusMemberRegistryListener
BusMember through the IBusMemberRegistry, when a new
BusMember is registered it is checked if it should be exported,
through the exporting operation chain, and if it should then it sends all
active sessions an import request. Exporter per ASG.| Modifier and Type | Class and Description |
|---|---|
static class |
Exporter.NullConcurrentHashMap
Helper class that wraps ConcurrentHashMap allowing for null values.
|
| Constructor and Description |
|---|
Exporter(ProxyPool pool)
Main Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activatedSession(Session session)
To be called when a new
Session is become active. |
void |
busMemberAdded(BusMember member,
IBusMemberRegistry.BusType type)
Invoked when a new BusMember is registered in the bus.
|
void |
busMemberRemoved(BusMember member,
IBusMemberRegistry.BusType type)
Invoked when an existing BusMember is unregistered from the bus.
Initiates Import-remove protocol: ![]() |
boolean |
isRemoveExport(String busMemberId,
Session session)
Called to check (and handle) if the remote
Importer is sending a
remove request. |
boolean |
isTracked(String bmURI)
Check whether the URI corresponds to a local
BusMember (excluding
ProxyBusMembers). |
void |
regParamsAdded(String busMemberID,
Resource[] params)
Invoked when registration parameters of an existing BusMember are added.
|
void |
regParamsRemoved(String busMemberID,
Resource[] params)
Invoked when registration parameters of an existing BusMember are
removed.
|
void |
stop()
Stop all operations.
|
void |
stopedSession(Session session)
To be called when a Session is about to be closed, or is disconnected.
|
public Exporter(ProxyPool pool)
pool - the pool of proxies to use.public void activatedSession(Session session)
Session is become active. Checks all the
possible BusMembers to be exported and checks for each if it
should be exported in the new session.session - public void stopedSession(Session session)
Importer in peers will be
reseted as soon as the connection is lost.session - public void busMemberAdded(BusMember member, IBusMemberRegistry.BusType type)
IBusMemberRegistryListenerbusMemberAdded in interface IBusMemberRegistryListenermember - newly added bus membertype - type of bus IBusMemberRegistrypublic void busMemberRemoved(BusMember member, IBusMemberRegistry.BusType type)

busMemberRemoved in interface IBusMemberRegistryListenermember - removed bus membertype - type of bus IBusMemberRegistrypublic void regParamsAdded(String busMemberID, Resource[] params)
ServiceProfiles for
ServiceCallees or ContextEventPattern for
ContextSubscriber.regParamsAdded in interface IBusMemberRegistryListenerbusMemberID - the ID of the bus member for which the registration parameters
have been added.params - the registration parameters that have been added.public void regParamsRemoved(String busMemberID, Resource[] params)
ServiceProfiles for ServiceCallees or
ContextEventPattern for ContextSubscriber.regParamsRemoved in interface IBusMemberRegistryListenerbusMemberID - the ID of the bus member for which the registration parameters
have been removed.params - the registration parameters that have been removed.public boolean isRemoveExport(String busMemberId, Session session)
Importer is sending a
remove request.busMemberId - session - public void stop()
public boolean isTracked(String bmURI)
BusMember (excluding
ProxyBusMembers).bmURI - the String containing the URI of the BusMember to check.BusMember that corresponds to
bmURI.Copyright © 2018 universAAL Consortium. All rights reserved.