org.xwiki.observation.remote.internal
Class DefaultRemoteObservationManager

java.lang.Object
  extended by org.xwiki.observation.remote.internal.DefaultRemoteObservationManager
All Implemented Interfaces:
org.xwiki.component.phase.Initializable, RemoteObservationManager

@Component
@Singleton
public class DefaultRemoteObservationManager
extends java.lang.Object
implements RemoteObservationManager, org.xwiki.component.phase.Initializable

JGoups based RemoteObservationManager. It's also the default implementation for now.

Since:
2.0M3
Version:
$Id$

Constructor Summary
DefaultRemoteObservationManager()
           
 
Method Summary
 void initialize()
          
 void notify(LocalEventData localEvent)
          Send a event in the different network channels.
 void notify(RemoteEventData remoteEvent)
          Inject a remote event in the local ObservationManager.
 void startChannel(java.lang.String channelId)
          Start a channel.
 void stopChannel(java.lang.String channelId)
          Stop a running channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRemoteObservationManager

public DefaultRemoteObservationManager()
Method Detail

initialize

public void initialize()
                throws org.xwiki.component.phase.InitializationException

Specified by:
initialize in interface org.xwiki.component.phase.Initializable
Throws:
org.xwiki.component.phase.InitializationException
See Also:
Initializable.initialize()

notify

public void notify(LocalEventData localEvent)
Send a event in the different network channels.

This method is not supposed to be used directly for a new event unless the user specifically want to bypass or emulate ObservationManager.

Specified by:
notify in interface RemoteObservationManager
Parameters:
localEvent - the event
See Also:
RemoteObservationManager.notify(org.xwiki.observation.remote.LocalEventData)

notify

public void notify(RemoteEventData remoteEvent)
Inject a remote event in the local ObservationManager.

This method is not supposed to be used directly for a new event unless the user specifically want to bypass or emulate network.

Specified by:
notify in interface RemoteObservationManager
Parameters:
remoteEvent - the event
See Also:
RemoteObservationManager.notify(org.xwiki.observation.remote.RemoteEventData)

startChannel

public void startChannel(java.lang.String channelId)
                  throws RemoteEventException
Start a channel.

Specified by:
startChannel in interface RemoteObservationManager
Parameters:
channelId - the identifier of the channel to start
Throws:
RemoteEventException - error when trying to start a channel
See Also:
RemoteObservationManager.startChannel(java.lang.String)

stopChannel

public void stopChannel(java.lang.String channelId)
                 throws RemoteEventException
Stop a running channel.

Specified by:
stopChannel in interface RemoteObservationManager
Parameters:
channelId - the identifier of the channel to stop
Throws:
RemoteEventException - error when trying to stop a running channel
See Also:
RemoteObservationManager.stopChannel(java.lang.String)


Copyright © 2004-2011 XWiki. All Rights Reserved.