|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RemoteObject | +--java.rmi.server.RemoteServer | +--java.rmi.server.UnicastRemoteObject | +--edu.cmu.cs.able.gaugeInfrastructure.RMI.RMIEventBus
The simulator of RMI event bus. This marshals and unmarshals events, provides an announcement interface, as well as a request/response interface.
Field Summary | |
int |
busPort
|
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary | |
RMIEventBus(int port)
Creates a new event bus |
Method Summary | |
void |
configureGauge(GaugeID theGaugeID,
StringPairVector configParams)
Configures a gauge |
java.rmi.Remote |
connectTo(java.lang.String host,
java.lang.String service)
Connects to a RMI service |
void |
createGauge(GaugeID theGaugeID,
StringPairVector setupParams,
StringPairVector mappings)
Creates a gauge |
void |
deleteGauge(GaugeID theGaugeID)
Deletes a gauge |
java.lang.String |
getGaugeHost(GaugeID gid)
Gets the host of a gauge |
java.lang.String |
getGaugeMgr(java.lang.String gaugeMgrType)
Get a gauge manager |
StringPairVector |
queryConfigMetaInfo(java.lang.String gaugeType)
|
StringPairVector |
queryValueMetaInfo(java.lang.String gaugeType)
|
void |
registerGauge(GaugeID theGaugeID,
StringPairVector setupParams,
java.lang.String gaugeHost)
Registers a gauge |
void |
registerGaugeConsumer(java.lang.String gaugeConsumerUID,
java.lang.String gaugeConsumerHost)
Registers a gauge consumer |
void |
registerGaugeMgr(java.lang.String gaugeMgrHost,
java.lang.String gaugeMgrUID,
java.lang.String gaugeMgrType)
Registers a gauge manager |
boolean |
reportConfigured(GaugeID gauge,
StringPairVector configParams)
Reports a configured event |
boolean |
reportCreated(GaugeID gauge)
Reports a created event |
boolean |
reportDeleted(GaugeID gauge)
Reports a deleted event |
boolean |
reportMultipleValues(GaugeID gauge,
GaugeValueVector values)
|
boolean |
reportValue(GaugeID gauge,
java.lang.String valueName,
java.lang.String propertyName,
java.lang.String value)
Reports a value |
void |
subscribeInterest(java.lang.String gaugeConsumerUID,
GaugeID theGaugeID,
GaugeEventType gaugeEvent)
Subscribes interest |
void |
subscribeToGaugeEvent(GaugeEvent event,
Subscriber subscriber)
|
void |
unsubscribeToGaugeEvent(GaugeEvent event,
Subscriber subscriber)
|
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public int busPort
Constructor Detail |
public RMIEventBus(int port) throws java.rmi.RemoteException
Method Detail |
public void configureGauge(GaugeID theGaugeID, StringPairVector configParams) throws java.rmi.RemoteException
configureGauge
in interface RMIEventBusHandle
theGaugeID
- The GaugeID of the gauge to be configuredconfigParams
- The configuration parameterspublic void createGauge(GaugeID theGaugeID, StringPairVector setupParams, StringPairVector mappings) throws java.rmi.RemoteException
createGauge
in interface RMIEventBusHandle
theGaugeID
- The GaugeID of the gauge to be createdsetupParams
- The setup parameterspublic void deleteGauge(GaugeID theGaugeID) throws java.rmi.RemoteException
deleteGauge
in interface RMIEventBusHandle
theGaugeID
- The GaugeID of the gauge to be deletedpublic void subscribeInterest(java.lang.String gaugeConsumerUID, GaugeID theGaugeID, GaugeEventType gaugeEvent) throws java.rmi.RemoteException
subscribeInterest
in interface RMIEventBusHandle
gaugeConsumerUID
- The UID of the gauge consumer subscribing interesttheGaugeID
- The GaugeID of the gauge to be observedgaugeEvent
- The gauge event in which the gauge consumer is interestedpublic java.lang.String getGaugeHost(GaugeID gid) throws java.rmi.RemoteException
getGaugeHost
in interface RMIEventBusHandle
gid
- The GaugeID of the gauge to be queried for host addresspublic void registerGaugeMgr(java.lang.String gaugeMgrHost, java.lang.String gaugeMgrUID, java.lang.String gaugeMgrType) throws java.rmi.RemoteException
registerGaugeMgr
in interface RMIEventBusHandle
gaugeMgrHost
- The host of the gauge manager to be registeredgaugeMgrUID
- The UID of the gauge manager to be registeredgaugeMgrUID
- The type of the gauge manager to be registeredpublic java.lang.String getGaugeMgr(java.lang.String gaugeMgrType) throws java.rmi.RemoteException
getGaugeMgr
in interface RMIEventBusHandle
gaugeMgrType
- The type of the gauge managerpublic StringPairVector queryConfigMetaInfo(java.lang.String gaugeType) throws java.rmi.RemoteException
queryConfigMetaInfo
in interface RMIEventBusHandle
public StringPairVector queryValueMetaInfo(java.lang.String gaugeType) throws java.rmi.RemoteException
queryValueMetaInfo
in interface RMIEventBusHandle
public void registerGauge(GaugeID theGaugeID, StringPairVector setupParams, java.lang.String gaugeHost) throws java.rmi.RemoteException
registerGauge
in interface RMIEventBusHandle
theGaugeID
- The GaugeID of the gauge to be registeredsetupParams
- The setup parameters of the gauge to be registeredgaugeHost
- The host of the gauge to be registered in the form of address:portpublic void registerGaugeConsumer(java.lang.String gaugeConsumerUID, java.lang.String gaugeConsumerHost) throws java.rmi.RemoteException
registerGaugeConsumer
in interface RMIEventBusHandle
gaugeConsumerUID
- The UID of the gauge consumer to be registeredgaugeConsumerHost
- The host of the gauge consumer to be registered in the form of address:portpublic java.rmi.Remote connectTo(java.lang.String host, java.lang.String service)
host
- The host of the serviceservice
- The name of the servicepublic boolean reportValue(GaugeID gauge, java.lang.String valueName, java.lang.String propertyName, java.lang.String value) throws java.rmi.RemoteException
reportValue
in interface RMIEventBusHandle
gauge
- The GaugeID of the gauge reporting the valuevalueName
- The name of the valuepropertyName
- The property name of the valuevalue
- The content of the valuepublic boolean reportMultipleValues(GaugeID gauge, GaugeValueVector values) throws java.rmi.RemoteException
reportMultipleValues
in interface RMIEventBusHandle
public boolean reportConfigured(GaugeID gauge, StringPairVector configParams) throws java.rmi.RemoteException
reportConfigured
in interface RMIEventBusHandle
gauge
- The GaugeID of the gauge reporting the eventconfigParams
- The configuration parameters in the reportpublic boolean reportDeleted(GaugeID gauge) throws java.rmi.RemoteException
reportDeleted
in interface RMIEventBusHandle
gauge
- The GaugeID of the gauge reporting the eventpublic boolean reportCreated(GaugeID gauge) throws java.rmi.RemoteException
reportCreated
in interface RMIEventBusHandle
gauge
- The GaugeID of the gauge reporting the eventpublic void subscribeToGaugeEvent(GaugeEvent event, Subscriber subscriber) throws java.rmi.RemoteException
subscribeToGaugeEvent
in interface RMIEventBusHandle
public void unsubscribeToGaugeEvent(GaugeEvent event, Subscriber subscriber) throws java.rmi.RemoteException
unsubscribeToGaugeEvent
in interface RMIEventBusHandle
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |