
public class ContextBusImpl extends AbstractBus implements ContextBus
busStrategy, communicationModule, context, OPTIONAL_URI_PREFIX, registry, spaceManager| Modifier and Type | Method and Description |
|---|---|
void |
addNewRegParams(String memberID,
ContextEventPattern[] registrParams)
Allows the members of the context bus to provide registration parameters;
for the meaning of the provided "registration parameters" see the
explanation for the input parameter
registrParams. |
void |
assessContentSerialization(Resource content) |
void |
brokerContextEvent(String publisherID,
ContextEvent msg)
Send a Context Event through the Context Bus
|
protected BusStrategy |
createBusStrategy(CommunicationModule commModule) |
ContextEventPattern[] |
getAllProvisions(String publisherID)
Returns all provisions registered by all
ContextPublishers on all
instances of this bus in the current Space. |
static Object[] |
getContextBusFetchParams() |
void |
handleSendError(ChannelMessage message,
CommunicationConnectorException e)
Callback for error handling
|
void |
removeMatchingRegParams(String memberID,
ContextEventPattern[] oldRegistrParams)
Removes registration parameters introduced previously through
ContextBus.addNewRegParams(String, ContextEventPattern[]). |
static void |
startModule(Container c,
ModuleContext mc,
Object[] contextBusShareParams,
Object[] contextBusFetchParams) |
static void |
stopModule() |
void |
unregister(String memberID,
BusMember m)
Unregisters bus member from the bus (if the bus member with given ID
exists).
|
void |
unregister(String publisherID,
ContextPublisher publisher)
Unregister a Context Publisher from the Context Bus
|
void |
unregister(String subscriberID,
ContextSubscriber subscriber)
Unregister a Context Subscriber from the Context Bus
|
addRegistryListener, brokerMessage, createBusSpecificID, createRegistry, dispose, getBrokerName, getBusMember, getBusMemberID, getBusMembers, getBusMembersByID, getCurrentNumberOfPeers, getPeerCard, getPeerFromBusResourceURI, getURI, init, initBrokerage, isBusResourceURI, isValidMember, messageReceived, register, removeRegistryListener, unmarshallpublic static Object[] getContextBusFetchParams()
public void assessContentSerialization(Resource content)
public static void startModule(Container c, ModuleContext mc, Object[] contextBusShareParams, Object[] contextBusFetchParams)
public static void stopModule()
protected BusStrategy createBusStrategy(CommunicationModule commModule)
createBusStrategy in class AbstractBuspublic void addNewRegParams(String memberID, ContextEventPattern[] registrParams)
ContextBusregistrParams.addNewRegParams in interface ContextBusmemberID - The ID of the subscriber or publisher registered to the
context busregistrParams - If the memberID refers to a context subscriber,
registrParams will be interpreted as the patterns
of the context events to which the subscriber wants to
subscribe, and if the memberID refers to a context publisher,
it will be interpreted as the patterns of the context events
that the publisher will publishpublic ContextEventPattern[] getAllProvisions(String publisherID)
ContextBusContextPublishers on all
instances of this bus in the current Space. Only
ContextPublishers are allowed to call this method, hence they
must provide their member-ID so that the bus can check this.getAllProvisions in interface ContextBuspublic void removeMatchingRegParams(String memberID, ContextEventPattern[] oldRegistrParams)
ContextBusContextBus.addNewRegParams(String, ContextEventPattern[]).removeMatchingRegParams in interface ContextBuspublic void brokerContextEvent(String publisherID, ContextEvent msg)
ContextBusbrokerContextEvent in interface ContextBuspublisherID - ID of the Publisher registered to the context busmsg - Context Event to forward through the buspublic void unregister(String publisherID, ContextPublisher publisher)
ContextBusunregister in interface ContextBuspublisherID - ID of the Publisher registered to the context buspublisher - The Publisher to unregister.public void unregister(String subscriberID, ContextSubscriber subscriber)
ContextBusunregister in interface ContextBussubscriberID - ID of the Subscriber registered to the context bussubscriber - The Subscriber to unregister.public void unregister(String memberID, BusMember m)
AbstractBusunregister in class AbstractBuspublic void handleSendError(ChannelMessage message, CommunicationConnectorException e)
MessageListenerhandleSendError in interface MessageListenerCopyright © 2018 universAAL Consortium. All rights reserved.