Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.event
Class XMPPBridge

    java.lang.Object
      org.apache.cayenne.event.EventBridge
          org.apache.cayenne.event.XMPPBridge

All Implemented Interfaces:
  EventListener

    public class XMPPBridge

extends EventBridge

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.

Since:
  1.2
Author:
  Andrus Adamchik

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 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

### secureConnection

    protected boolean secureConnection

### loginId

    protected String loginId

### password

    protected String password

### xmppHost

    protected String xmppHost

### xmppPort

    protected int xmppPort

### chatService

    protected String chatService

### sessionHandle

    protected String sessionHandle

### connection

    protected org.jivesoftware.smack.XMPPConnection connection

### groupChat

    protected org.jivesoftware.smack.GroupChat groupChat

### connected

    protected boolean connected

Constructor Detail

### XMPPBridge

    public XMPPBridge(EventSubject localSubject,
                      String externalSubject)

  Creates an XMPPBridge. External subject will be used as the chat group name.

### XMPPBridge

    public XMPPBridge(Collection localSubjects,
                      String externalSubject)

  Creates an XMPPBridge. External subject will be used as the chat group name.

Method Detail

### getXmppHost

    public String getXmppHost()

### setXmppHost

    public void setXmppHost(String xmppHost)

### getXmppPort

    public int getXmppPort()

### setXmppPort

    public void setXmppPort(int xmppPort)

### getLoginId

    public String getLoginId()

### setLoginId

    public void setLoginId(String loginId)

### getPassword

    public String getPassword()

### setPassword

    public void setPassword(String password)

### isSecureConnection

    public boolean isSecureConnection()

### setSecureConnection

    public void setSecureConnection(boolean secureConnection)

### getChatService

    public String getChatService()

### setChatService

    public void setChatService(String chatService)

### getSessionHandle

    public String getSessionHandle()

### setSessionHandle

    public void setSessionHandle(String sessionHandle)

### startupExternal

    protected void startupExternal()
                            throws Exception

  Description copied from class: `EventBridge`
  Starts an external interface of the EventBridge.

  Specified by:
    `startupExternal` in class `EventBridge`
  Throws:
    `Exception`

### shutdownExternal

    protected void shutdownExternal()
                             throws Exception

  Description copied from class: `EventBridge`
  Shuts down the external interface of the EventBridge, cleaning up and releasing any resources used to communicate external events.

  Specified by:
    `shutdownExternal` in class `EventBridge`
  Throws:
    `Exception`

### sendExternalEvent

    protected void sendExternalEvent(CayenneEvent localEvent)
                              throws Exception

  Description copied from class: `EventBridge`
  Sends a Cayenne event over the transport supported by this bridge.

  Specified by:
    `sendExternalEvent` in class `EventBridge`
  Throws:
    `Exception`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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