org.universAAL.middleware.bus.member
Class BusMember

Package class diagram package BusMember
java.lang.Object
  extended by org.universAAL.middleware.bus.member.BusMember
Direct Known Subclasses:
Callee, Caller, Publisher, Subscriber

public abstract class BusMember
extends Object

An AALSpaceParticipant can connect to the different buses of the universAAL middleware by becoming a member, i.e., by creating instances of this class. Each instance of BusMember represents exactly one connection with a specific role on one specific bus: on call-based buses either as a caller or as a callee and on event-based buses either as a publisher or as a subscriber. However, there is no limitation for the number of instances of BusMember that an AALSpaceParticipant can create; i.e., an AALSpaceParticipant can create different instances of BusMember to connect to different buses; it is also possible to connect with different roles to the same bus or even create, say, several publishers on one and the same event-based bus while at the same time creating even several subscribers on that very bus. BusMember is an abstract class with the idea that for each concrete role on each concrete bus a specific subclass is created. It also forces that the creation of an instance is bound to a specific AALSpaceParticipant.

Author:
mtazari - Saied Tazari

Field Summary
protected  String busResourceURI
           
protected  ModuleContext owner
           
protected  AbstractBus theBus
           
 
Constructor Summary
protected BusMember(ModuleContext owner, Object[] busFetchParams, BusMemberType type)
           
 
Method Summary
abstract  void busDyingOut(AbstractBus b)
          This method is called when the bus is stopped to announce this to the bus members.
 void close()
          Unregisters the Subscriber from the Context bus.
 BusMemberType getType()
          Get the type of this bus member.
 String getURI()
          URI of this bus member.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

owner

protected final ModuleContext owner

theBus

protected final AbstractBus theBus

busResourceURI

protected final String busResourceURI
Constructor Detail

BusMember

protected BusMember(ModuleContext owner,
                    Object[] busFetchParams,
                    BusMemberType type)
Method Detail

close

public void close()
Unregisters the Subscriber from the Context bus.


busDyingOut

public abstract void busDyingOut(AbstractBus b)
This method is called when the bus is stopped to announce this to the bus members.

Parameters:
b - bus on which this member has been registered
See Also:
AbstractBus

getURI

public String getURI()
URI of this bus member. The URI is created by the bus and set during registration of the the bus member at the bus.


getType

public BusMemberType getType()
Get the type of this bus member.

Returns:
the type of this bus member.


Copyright © 2014 universAAL Consortium. All Rights Reserved.