org.xwiki.observation.remote.internal.converter
Class DefaultEventConverterManager

java.lang.Object
  extended by org.xwiki.observation.remote.internal.converter.DefaultEventConverterManager
All Implemented Interfaces:
org.xwiki.component.phase.Initializable, EventConverterManager

@Component
public class DefaultEventConverterManager
extends java.lang.Object
implements EventConverterManager, org.xwiki.component.phase.Initializable

Default implementation of EventConverterManager.

Since:
2.0M3
Version:
$Id$

Constructor Summary
DefaultEventConverterManager()
           
 
Method Summary
 LocalEventData createLocalEventData(RemoteEventData remoteEvent)
          Convert a remote event to a local event.
 RemoteEventData createRemoteEventData(LocalEventData localEvent)
          Convert a local event to a remote event.
 java.util.List<LocalEventConverter> getLocalEventConverters()
          
 java.util.List<RemoteEventConverter> getRemoteEventConverters()
          
 void initialize()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultEventConverterManager

public DefaultEventConverterManager()
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()

getLocalEventConverters

public java.util.List<LocalEventConverter> getLocalEventConverters()

Specified by:
getLocalEventConverters in interface EventConverterManager
Returns:
the local to remote events converters
See Also:
EventConverterManager.getLocalEventConverters()

getRemoteEventConverters

public java.util.List<RemoteEventConverter> getRemoteEventConverters()

Specified by:
getRemoteEventConverters in interface EventConverterManager
Returns:
the remote to local events converters
See Also:
EventConverterManager.getRemoteEventConverters()

createRemoteEventData

public RemoteEventData createRemoteEventData(LocalEventData localEvent)
Convert a local event to a remote event.

Specified by:
createRemoteEventData in interface EventConverterManager
Parameters:
localEvent - the local event
Returns:
the remote event, if null the event should not be sent to the network.
See Also:
EventConverterManager.createRemoteEventData(org.xwiki.observation.remote.LocalEventData)

createLocalEventData

public LocalEventData createLocalEventData(RemoteEventData remoteEvent)
Convert a remote event to a local event.

Specified by:
createLocalEventData in interface EventConverterManager
Parameters:
remoteEvent - the remote event
Returns:
the local event, if null the event should not send to ObservationManager.
See Also:
EventConverterManager.createLocalEventData(org.xwiki.observation.remote.RemoteEventData)


Copyright © 2004-2011 XWiki. All Rights Reserved.