org.universAAL.middleware.context
Class ContextPublisher

Package class diagram package ContextPublisher
java.lang.Object
  extended by org.universAAL.middleware.bus.member.BusMember
      extended by org.universAAL.middleware.bus.member.Publisher
          extended by org.universAAL.middleware.context.ContextPublisher
Direct Known Subclasses:
AuthenticationPublisher, CPublisher, DefaultContextPublisher, ReliabilityReasonerPublisher, SessionPublisher

public abstract class ContextPublisher
extends Publisher

Provides the interface to be implemented by context publishers together with shared code. Only instances of this class can publish context events. The convention of the context bus regarding the registration parameters is the following:

Author:
mtazari - Saied Tazari

Field Summary
 
Fields inherited from class org.universAAL.middleware.bus.member.BusMember
busResourceURI, owner, theBus
 
Constructor Summary
protected ContextPublisher(ModuleContext context, ContextProvider providerInfo)
          Creates a Context Publisher with the associated Context Provider Information
 
Method Summary
 void busDyingOut(AbstractBus b)
          This method is called when the bus is stopped to announce this to the bus members.
abstract  void communicationChannelBroken()
          Method to be called when the communication of the Publisher with the Context Bus is lost.
 String getMyID()
           
 void publish(ContextEvent e)
          Forward a Context Event through the Context Bus
 
Methods inherited from class org.universAAL.middleware.bus.member.BusMember
close, getType, getURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextPublisher

protected ContextPublisher(ModuleContext context,
                           ContextProvider providerInfo)
Creates a Context Publisher with the associated Context Provider Information

Parameters:
context - The context of the Bundle creating the Publisher
providerInfo - The Information describing the Publisher
Method Detail

communicationChannelBroken

public abstract void communicationChannelBroken()
Method to be called when the communication of the Publisher with the Context Bus is lost.


busDyingOut

public final void busDyingOut(AbstractBus b)
Description copied from class: BusMember
This method is called when the bus is stopped to announce this to the bus members.

Specified by:
busDyingOut in class BusMember
Parameters:
b - bus on which this member has been registered
See Also:
AbstractBus

publish

public final void publish(ContextEvent e)
Forward a Context Event through the Context Bus

Parameters:
e - The Context Event to forward
Throws:
NullPointerException - if the event is null

getMyID

public String getMyID()


Copyright © 2014 universAAL Consortium. All Rights Reserved.