|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.objectplanet.survey.plugin.PluginBusSurvey
This class is opinio's event notification mechanism for survey type events. To enhance performance and scalability, the component that is registered on the bus can subscribe to events for a single survey, or to all surveys. Subscribing to all surveys (indicating the survey id 0) should be done with care, because the plugin must then handle a lot of events (several events per question per respondent).
Constructor Summary | |
PluginBusSurvey()
|
Method Summary | |
static void |
addToBus(IPBComponent comp,
long surveyId)
Adds a component to the bus. |
static IPBComponent[] |
getComponents(long surveyId)
Returns an array of all components connected to the specific survey bus. |
static void |
removeFromBus(IPBComponent comp,
long surveyId)
Removes a component from the bus. |
static void |
send(PluginBusEvent event,
long surveyId)
Sends an event to all components on the bus. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PluginBusSurvey()
Method Detail |
public static IPBComponent[] getComponents(long surveyId)
surveyId
- Survey id of the plugin bus to get. 0 will return
components that have registered to receive all events.
public static void addToBus(IPBComponent comp, long surveyId)
comp
- The component to addsurveyId
- The feature to be added to the ToBus attributepublic static void removeFromBus(IPBComponent comp, long surveyId)
comp
- The component to removesurveyId
- Survey id of the survey to receive events from. 0 (zero)
specifies all surveys. Use the value 0 with care, because
this may reduce performance of the application.public static void send(PluginBusEvent event, long surveyId)
event
- The eventsurveyId
- Sends events to all listening plugins.
|
Copyright © ObjectPlanet Inc. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |