|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.event.EventBridge
org.apache.cayenne.event.JavaGroupsBridge
public class JavaGroupsBridge
Implementation of EventBridge that passes and receives events via JavaGroups communication software.
Field Summary | |
---|---|
protected PullPushAdapter |
adapter
|
protected Channel |
channel
|
protected java.lang.String |
configURL
|
protected java.lang.String |
multicastAddress
|
protected java.lang.String |
multicastPort
|
protected byte[] |
state
|
Fields inherited from class org.apache.cayenne.event.EventBridge |
---|
eventManager, externalEventSource, externalSubject, localSubjects, mode, RECEIVE_EXTERNAL, RECEIVE_LOCAL, RECEIVE_LOCAL_EXTERNAL |
Constructor Summary | |
---|---|
JavaGroupsBridge(java.util.Collection<EventSubject> localSubjects,
java.lang.String externalSubject)
|
|
JavaGroupsBridge(EventSubject localSubject,
java.lang.String externalSubject)
Creates new instance of JavaGroupsBridge. |
Method Summary | |
---|---|
protected java.lang.String |
buildConfigString()
Creates JavaGroups configuration String, using preconfigured multicast port and address. |
protected java.io.Serializable |
eventToMessageObject(CayenneEvent event)
Converts CayenneEvent to a serializable object that will be sent via JMS. |
java.lang.String |
getConfigURL()
|
java.lang.String |
getMulticastAddress()
|
java.lang.String |
getMulticastPort()
|
byte[] |
getState()
|
protected CayenneEvent |
messageObjectToEvent(java.io.Serializable object)
Converts a Serializable instance to CayenneEvent. |
void |
receive(Message message)
Implementation of org.javagroups.MessageListener - a callback method to process incoming messages. |
protected void |
sendExternalEvent(CayenneEvent localEvent)
Sends a Cayenne event over the transport supported by this bridge. |
void |
setConfigURL(java.lang.String configURL)
|
void |
setMulticastAddress(java.lang.String multicastAddress)
|
void |
setMulticastPort(java.lang.String multicastPort)
|
void |
setState(byte[] state)
|
protected void |
shutdownExternal()
Shuts down the external interface of the EventBridge, cleaning up and releasing any resources used to communicate external events. |
protected void |
startupExternal()
Starts an external interface of the EventBridge. |
Methods inherited from class org.apache.cayenne.event.EventBridge |
---|
convertToExternalSubject, getEventManager, getExternalEventSource, getExternalSubject, getLocalSubjects, isRunning, onExternalEvent, receivesExternalEvents, receivesLocalEvents, shutdown, startup, startup, startup |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected byte[] state
protected Channel channel
protected PullPushAdapter adapter
protected java.lang.String multicastAddress
protected java.lang.String multicastPort
protected java.lang.String configURL
Constructor Detail |
---|
public JavaGroupsBridge(EventSubject localSubject, java.lang.String externalSubject)
public JavaGroupsBridge(java.util.Collection<EventSubject> localSubjects, java.lang.String externalSubject)
Method Detail |
---|
public java.lang.String getConfigURL()
public void setConfigURL(java.lang.String configURL)
public java.lang.String getMulticastAddress()
public void setMulticastAddress(java.lang.String multicastAddress)
public java.lang.String getMulticastPort()
public void setMulticastPort(java.lang.String multicastPort)
public byte[] getState()
public void setState(byte[] state)
public void receive(Message message)
protected void startupExternal() throws java.lang.Exception
EventBridge
startupExternal
in class EventBridge
java.lang.Exception
protected java.lang.String buildConfigString()
protected void shutdownExternal() throws java.lang.Exception
EventBridge
shutdownExternal
in class EventBridge
java.lang.Exception
protected void sendExternalEvent(CayenneEvent localEvent) throws java.lang.Exception
EventBridge
sendExternalEvent
in class EventBridge
java.lang.Exception
protected java.io.Serializable eventToMessageObject(CayenneEvent event) throws java.lang.Exception
java.lang.Exception
protected CayenneEvent messageObjectToEvent(java.io.Serializable object) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |