|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaEventBus
The wrapper around the Siena event bus. This marshals and unmarshals events, provides an announcement interface, as well as a request/response interface. Currently, this class is a little cludgy. In future versions it will be split into four classses - an abstact root class and one for the each type of bus (Gauge, GaugeMgr, GaugeConsumer) that deals with specific events.
Field Summary | |
protected static java.lang.String |
ANNOUNCE
The tag for event direction=announce |
protected static java.lang.String |
CONFIG
The tag used in a Siena notification to denote the config attribute name |
protected static java.lang.String |
CONFIGURE
The tag for a ConfigureEvent |
protected static java.lang.String |
CONFIGURED
The tag for a ConfiguredEvent. |
protected static java.lang.String |
CREATE
The tag for a CreateEvent |
protected static java.lang.String |
CREATED
The tag for a CreatedEvent. |
protected static java.lang.String |
DELETE
The tag for a DeleteEvent |
protected static java.lang.String |
DELETED
The tag for a DeletedEvent. |
protected static java.lang.String |
DIRECTION
The tag used in a Siena notification to denote the direction attribute name |
protected static java.lang.String |
EVENTID
The tag used in a Siena notification to denote the event ID attribute name |
protected static java.lang.String |
EVENTTYPE
The tag used in a Siena notification to denote the event type attribute name |
protected static java.lang.String |
FINDGMGR
The tag for a FindGaugeMgrEvent |
protected static java.lang.String |
FINISHEDCREATION
The tag for a CreationFinishedEvent |
protected static java.lang.String |
GAUGEINIT
The tag for GaugeInitEvent |
protected static java.lang.String |
GAUGEMGRID
The tag used in a Siena notification to denote the gauge manager ID attribute name |
protected static java.lang.String |
GMGRDELETEGAUGE
The tag for GMgrDeleteGaugeEvent |
protected static java.lang.String |
INITIATOR
The tag used in a Siena notification to denote the initiator attribute name |
protected static java.lang.String |
MAPPINGS
The tag used in a Siena notification to denote the mappings attribute name |
protected static java.lang.String |
METAINFO
The tag for a QueryMetaInfoEvent |
protected static java.lang.String |
MULTIPLEVALUES
The tag for a MultipleValueEvent |
protected static java.lang.String |
QUERYALLVALUES
The tag for a QueryAllValuesEvent |
protected static java.lang.String |
QUERYSTATE
The tag for a QueryStateEvent |
protected static java.lang.String |
QUERYVALUE
The tag for a QueryValueEvent |
protected static java.lang.String |
REQUEST
The tag for event direction=request |
protected static java.lang.String |
RESPONSE
The tag for event direction=response |
protected static int |
RETRIES
How many times to retry a blocking wait |
static java.lang.String |
senp
The Siena port |
protected static java.lang.String |
SETUP
The tag used in a Siena notification to denote the setup attribute name |
static siena.HierarchicalDispatcher |
siena
The siena bus |
protected static java.lang.String |
STATUS
The tag used in a Siena notification to denote the status attribute name |
static SienaEventBus |
theEventBus
Only one event bus can be constructed. |
protected static int |
TIMEOUT
How long to wait for a blocking response (in milliseconds) |
protected static java.lang.String |
VALUE
The tag for a ValueEvent |
Constructor Summary | |
SienaEventBus(java.lang.String uri)
Creates a new event bus |
Method Summary | |
static void |
addGaugeInfo(GaugeID event,
siena.Filter f)
Flattens all the gauge info to the filter. |
static void |
addGaugeInfo(GaugeID gauge,
siena.Notification n)
Flattens all the gauge info to the notification. |
siena.Filter |
event2Filter(GaugeEvent event)
|
GaugeEvent |
notification2Event(siena.Notification e)
|
void |
notify(siena.Notification e)
Called by Siena when a matching event is published. |
void |
notify(siena.Notification[] e)
|
void |
notifyGauge(siena.Notification e)
Notifies a gauge of events of interest. |
void |
notifyGaugeConsumer(siena.Notification e)
Notifies GaugeConsumers of an event that is of interest to them |
boolean |
publishAnnouncement(GaugeEvent event)
Publishes an announcement on the bus |
GaugeEvent |
publishRequest(GaugeEvent event)
Publishes a request on the bus. |
boolean |
publishResponse(GaugeEvent event,
java.lang.String initiator)
Publishes a response. |
boolean |
registerConfiguredEvents(GaugeConsumer consumer,
GaugeControl gauge)
|
boolean |
registerCreatedEvents(GaugeConsumer consumer,
GaugeControl gauge)
|
boolean |
registerDeletedEvents(GaugeConsumer consumer,
GaugeControl gauge)
|
void |
registerGauge(GaugeControl gauge)
|
void |
registerGaugeMgr(GaugeMgr gMgr)
|
boolean |
registerValueEvents(GaugeConsumer consumer,
GaugeControl gauge)
|
void |
unregisterGauge(GaugeControl gauge)
|
boolean |
unregisterGaugeEvents(GaugeConsumer consumer,
GaugeControl gauge)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String CONFIGURED
protected static final java.lang.String DELETED
protected static final java.lang.String CREATED
protected static final java.lang.String MULTIPLEVALUES
MultipleValueEvent
protected static final java.lang.String VALUE
ValueEvent
protected static final java.lang.String DELETE
DeleteEvent
protected static final java.lang.String CONFIGURE
ConfigureEvent
protected static final java.lang.String CREATE
CreateEvent
protected static final java.lang.String METAINFO
QueryMetaInfoEvent
protected static final java.lang.String QUERYVALUE
QueryValueEvent
protected static final java.lang.String QUERYALLVALUES
QueryAllValuesEvent
protected static final java.lang.String QUERYSTATE
QueryStateEvent
protected static final java.lang.String FINDGMGR
FindGaugeMgrEvent
protected static final java.lang.String REQUEST
protected static final java.lang.String ANNOUNCE
protected static final java.lang.String RESPONSE
protected static final java.lang.String GAUGEINIT
GaugeInitEvent
protected static final java.lang.String GMGRDELETEGAUGE
GMgrDeleteGaugeEvent
protected static final java.lang.String FINISHEDCREATION
protected static final java.lang.String EVENTTYPE
protected static final java.lang.String GAUGEMGRID
protected static final java.lang.String SETUP
protected static final java.lang.String MAPPINGS
protected static final java.lang.String CONFIG
protected static final java.lang.String STATUS
protected static final java.lang.String INITIATOR
protected static final java.lang.String EVENTID
protected static final java.lang.String DIRECTION
protected static final int TIMEOUT
protected static final int RETRIES
public static siena.HierarchicalDispatcher siena
public static SienaEventBus theEventBus
public static java.lang.String senp
Constructor Detail |
public SienaEventBus(java.lang.String uri)
uri
- The Siena port to connect toMethod Detail |
public boolean publishAnnouncement(GaugeEvent event)
event
- The event to be announcedpublic GaugeEvent publishRequest(GaugeEvent event)
event
- The request to publishpublic boolean publishResponse(GaugeEvent event, java.lang.String initiator)
event
- The reply to be publishedinitiator
- Who the reply should go topublic static void addGaugeInfo(GaugeID gauge, siena.Notification n)
gauge
- The ID of the gauge to turn into a notificationn
- The notification to contain the flattened gauge IDpublic static void addGaugeInfo(GaugeID event, siena.Filter f)
event
- The gauge ID to be flattened.f
- The filter to contain the flattened GaugeIDpublic void notifyGaugeConsumer(siena.Notification e)
e
- The eventpublic void notifyGauge(siena.Notification e)
e
- The eventpublic void notify(siena.Notification e)
notify
in interface siena.Notifiable
e
- public void notify(siena.Notification[] e)
notify
in interface siena.Notifiable
public boolean registerDeletedEvents(GaugeConsumer consumer, GaugeControl gauge)
public boolean registerCreatedEvents(GaugeConsumer consumer, GaugeControl gauge)
public boolean registerConfiguredEvents(GaugeConsumer consumer, GaugeControl gauge)
public boolean registerValueEvents(GaugeConsumer consumer, GaugeControl gauge)
public boolean unregisterGaugeEvents(GaugeConsumer consumer, GaugeControl gauge)
public void registerGauge(GaugeControl gauge)
public void unregisterGauge(GaugeControl gauge)
public siena.Filter event2Filter(GaugeEvent event)
public GaugeEvent notification2Event(siena.Notification e)
public void registerGaugeMgr(GaugeMgr gMgr)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |