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.

Since:
1.1
Author:
Andrei Adamchik

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 localSubjects, java.lang.String externalSubject, java.util.Map properties)
          Creates a JavaGroupsBridge instance.
 EventBridge createEventBridge(EventSubject localSubject, java.util.Map properties)
          Deprecated. since 1.2, as we now need to support multiple subjects.
 
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. Example file can be found at http://www.filip.net/javagroups/javagroups-protocol.xml.

See Also:
Constant Field Values
Constructor Detail

JavaGroupsBridgeFactory

public JavaGroupsBridgeFactory()
Method Detail

createEventBridge

public EventBridge createEventBridge(EventSubject localSubject,
                                     java.util.Map properties)
Deprecated. since 1.2, as we now need to support multiple subjects.

Specified by:
createEventBridge in interface EventBridgeFactory

createEventBridge

public EventBridge createEventBridge(java.util.Collection localSubjects,
                                     java.lang.String externalSubject,
                                     java.util.Map 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-2006 Apache.org All Rights Reserved.