org.apache.cayenne.event
Class JavaGroupsBridgeFactory

java.lang.Object
  extended by org.apache.cayenne.event.JavaGroupsBridgeFactory
All Implemented Interfaces:
EventBridgeFactory

public class JavaGroupsBridgeFactory
extends java.lang.Object
implements EventBridgeFactory

Factory to create JavaGroupsBridge instances. If JavaGroups library is not installed this factory will return a noop EventBridge as a failover mechanism. For further information about JavaGroups consult the documentation.

Since:
1.1

Field Summary
static java.lang.String JGROUPS_CONFIG_URL_PROPERTY
          Defines a property for JavaGroups XML configuration file.
static java.lang.String MCAST_ADDRESS_DEFAULT
           
static java.lang.String MCAST_ADDRESS_PROPERTY
           
static java.lang.String MCAST_PORT_DEFAULT
           
static java.lang.String MCAST_PORT_PROPERTY
           
 
Constructor Summary
JavaGroupsBridgeFactory()
           
 
Method Summary
 EventBridge createEventBridge(java.util.Collection<EventSubject> localSubjects, java.lang.String externalSubject, java.util.Map<java.lang.String,java.lang.Object> properties)
          Creates a JavaGroupsBridge instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MCAST_ADDRESS_DEFAULT

public static final java.lang.String MCAST_ADDRESS_DEFAULT
See Also:
Constant Field Values

MCAST_PORT_DEFAULT

public static final java.lang.String MCAST_PORT_DEFAULT
See Also:
Constant Field Values

MCAST_ADDRESS_PROPERTY

public static final java.lang.String MCAST_ADDRESS_PROPERTY
See Also:
Constant Field Values

MCAST_PORT_PROPERTY

public static final java.lang.String MCAST_PORT_PROPERTY
See Also:
Constant Field Values

JGROUPS_CONFIG_URL_PROPERTY

public static final java.lang.String JGROUPS_CONFIG_URL_PROPERTY
Defines a property for JavaGroups XML configuration file.

See Also:
Constant Field Values
Constructor Detail

JavaGroupsBridgeFactory

public JavaGroupsBridgeFactory()
Method Detail

createEventBridge

public EventBridge createEventBridge(java.util.Collection<EventSubject> localSubjects,
                                     java.lang.String externalSubject,
                                     java.util.Map<java.lang.String,java.lang.Object> properties)
Creates a JavaGroupsBridge instance. Since JavaGroups is not shipped with Cayenne and should be installed separately, a common misconfiguration problem may be the absense of JavaGroups jar file. This factory returns a dummy noop EventBridge, if this is the case. This would allow the application to continue to run, but without remote notifications.

Specified by:
createEventBridge in interface EventBridgeFactory


Copyright © 2001-2012 Apache Cayenne. All Rights Reserved.