com.objectplanet.survey.plugin
Class PluginBusSurvey

java.lang.Object
  extended by com.objectplanet.survey.plugin.PluginBusSurvey
All Implemented Interfaces:
IEventListener

Deprecated. @see com.objectplanet.survey.event package.

public class PluginBusSurvey
extends java.lang.Object
implements IEventListener

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). This class is deprecated. Use the new event mechanism in the com.objectplanet.survey.event and com.objectplanet.survey.event.events package.

Author:
Torgeir Punnerud
Created:
26. august 2002

Constructor Summary
PluginBusSurvey()
          Deprecated. Constructs an instance of the PluginBusSurvey.
 
Method Summary
static void addToBus(IPBComponent comp, long surveyId)
          Deprecated.  
static IPBComponent[] getComponents(long surveyId)
          Deprecated.  
 void handleEvent(Event event)
          Deprecated. Listens to internal events, and passes them on to listeners (plugins).
 PluginBusSurvey instance()
          Deprecated.  
static void removeFromBus(IPBComponent comp, long surveyId)
          Deprecated.  
static void send(PluginBusEvent event, long surveyId)
          Deprecated.  
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginBusSurvey

public PluginBusSurvey()
Deprecated. 
Constructs an instance of the PluginBusSurvey. It is a singleton. The instance is used for event listening.

Method Detail

instance

public PluginBusSurvey instance()
Deprecated. 

getComponents

public static IPBComponent[] getComponents(long surveyId)
Deprecated. 

Returns an array of all components connected to the specific survey bus.

Parameters:
surveyId - Survey id of the plugin bus to get. 0 will return components that have registered to receive all events.
Returns:
The components value

addToBus

public static void addToBus(IPBComponent comp,
                            long surveyId)
Deprecated. 

Adds a component to the bus. It will receive all events sent on the bus.

Parameters:
comp - The component to add
surveyId - The feature to be added to the ToBus attribute

removeFromBus

public static void removeFromBus(IPBComponent comp,
                                 long surveyId)
Deprecated. 

Removes a component from the bus.

Parameters:
comp - The component to remove
surveyId - 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.

send

public static void send(PluginBusEvent event,
                        long surveyId)
Deprecated. 

Sends an event to all components on the bus. The event will be sent to all components in turn, with the original sender receiving it last.

Parameters:
event - The event
surveyId - Sends events to all listening plugins.

handleEvent

public void handleEvent(Event event)
Deprecated. 
Listens to internal events, and passes them on to listeners (plugins). Must NOT be called from a plugin.

Specified by:
handleEvent in interface IEventListener
Parameters:
event - The event
See Also:
IEventListener.handleEvent(com.objectplanet.survey.event.Event)

Copyright ? ObjectPlanet Inc. All Rights Reserved.

Built on December 20 2016