|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.middleware.bus.model.AbstractBus
org.universAAL.middleware.context.impl.ContextBusImpl
public class ContextBusImpl
Field Summary |
---|
Fields inherited from class org.universAAL.middleware.bus.model.AbstractBus |
---|
aalSpaceManager, busStrategy, communicationModule, context, registry |
Method Summary | |
---|---|
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 ContextPublisher s on all
instances of this bus in the current AAL 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 |
Methods inherited from class org.universAAL.middleware.bus.model.AbstractBus |
---|
addRegistryListener, brokerMessage, createRegistry, dispose, getBrokerName, getBusMember, getBusMemberID, getBusMembers, getBusMembersByID, getCurrentNumberOfPeers, getPeerCard, getPeerFromBusResourceURI, getURI, init, initBrokerage, isBusResourceURI, isValidMember, messageReceived, register, removeRegistryListener, unmarshall |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public 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 AbstractBus
public void addNewRegParams(String memberID, ContextEventPattern[] registrParams)
ContextBus
registrParams
.
addNewRegParams
in interface ContextBus
memberID
- 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)
ContextBus
ContextPublisher
s on all
instances of this bus in the current AAL Space. Only
ContextPublisher
s are allowed to call this method, hence they
must provide their member-ID so that the bus can check this.
getAllProvisions
in interface ContextBus
public void removeMatchingRegParams(String memberID, ContextEventPattern[] oldRegistrParams)
ContextBus
ContextBus.addNewRegParams(String, ContextEventPattern[])
.
removeMatchingRegParams
in interface ContextBus
public void brokerContextEvent(String publisherID, ContextEvent msg)
ContextBus
brokerContextEvent
in interface ContextBus
publisherID
- ID of the Publisher registered to the context busmsg
- Context Event to forward through the buspublic void unregister(String publisherID, ContextPublisher publisher)
ContextBus
unregister
in interface ContextBus
publisherID
- ID of the Publisher registered to the context buspublisher
- The Publisher to unregister.public void unregister(String subscriberID, ContextSubscriber subscriber)
ContextBus
unregister
in interface ContextBus
subscriberID
- ID of the Subscriber registered to the context bussubscriber
- The Subscriber to unregister.public void unregister(String memberID, BusMember m)
AbstractBus
unregister
in class AbstractBus
public void handleSendError(ChannelMessage message, CommunicationConnectorException e)
MessageListener
handleSendError
in interface MessageListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |