|
||||||||||
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.XMPPBridge
public class XMPPBridge
An EventBridge implementation based on XMPP protocol and Smack XMPP client library. What's good about XMPP (Extensible Messaging and Presence Protocol, an IETF standard protocol that grew up from Jabber IM) is that generally it has fewer or no deployment limitations (unlike JMS and JGroups that are generally a good solution for local controlled networks). Also it provides lots of additional information for free, such as presence, and much more.
This implementation is based on Smack XMPP client library from JiveSoftware.
Field Summary | |
---|---|
protected String |
chatService
|
protected boolean |
connected
|
protected org.jivesoftware.smack.XMPPConnection |
connection
|
protected org.jivesoftware.smack.GroupChat |
groupChat
|
protected String |
loginId
|
protected String |
password
|
protected boolean |
secureConnection
|
protected String |
sessionHandle
|
protected String |
xmppHost
|
protected int |
xmppPort
|
Fields inherited from class org.apache.cayenne.event.EventBridge |
---|
eventManager, externalEventSource, externalSubject, localSubjects, mode, RECEIVE_EXTERNAL, RECEIVE_LOCAL, RECEIVE_LOCAL_EXTERNAL |
Constructor Summary | |
---|---|
XMPPBridge(Collection<EventSubject> localSubjects,
String externalSubject)
Creates an XMPPBridge. |
|
XMPPBridge(EventSubject localSubject,
String externalSubject)
Creates an XMPPBridge. |
Method Summary | |
---|---|
String |
getChatService()
|
String |
getLoginId()
|
String |
getPassword()
|
String |
getSessionHandle()
|
String |
getXmppHost()
|
int |
getXmppPort()
|
boolean |
isSecureConnection()
|
protected void |
sendExternalEvent(CayenneEvent localEvent)
Sends a Cayenne event over the transport supported by this bridge. |
void |
setChatService(String chatService)
|
void |
setLoginId(String loginId)
|
void |
setPassword(String password)
|
void |
setSecureConnection(boolean secureConnection)
|
void |
setSessionHandle(String sessionHandle)
|
void |
setXmppHost(String xmppHost)
|
void |
setXmppPort(int xmppPort)
|
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 boolean secureConnection
protected String loginId
protected String password
protected String xmppHost
protected int xmppPort
protected String chatService
protected String sessionHandle
protected org.jivesoftware.smack.XMPPConnection connection
protected org.jivesoftware.smack.GroupChat groupChat
protected boolean connected
Constructor Detail |
---|
public XMPPBridge(EventSubject localSubject, String externalSubject)
public XMPPBridge(Collection<EventSubject> localSubjects, String externalSubject)
Method Detail |
---|
public String getXmppHost()
public void setXmppHost(String xmppHost)
public int getXmppPort()
public void setXmppPort(int xmppPort)
public String getLoginId()
public void setLoginId(String loginId)
public String getPassword()
public void setPassword(String password)
public boolean isSecureConnection()
public void setSecureConnection(boolean secureConnection)
public String getChatService()
public void setChatService(String chatService)
public String getSessionHandle()
public void setSessionHandle(String sessionHandle)
protected void startupExternal() throws Exception
EventBridge
startupExternal
in class EventBridge
Exception
protected void shutdownExternal() throws Exception
EventBridge
shutdownExternal
in class EventBridge
Exception
protected void sendExternalEvent(CayenneEvent localEvent) throws Exception
EventBridge
sendExternalEvent
in class EventBridge
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |