Overview | Package | Class | 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:
  java.util.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 java.lang.String` | `chatService`
`protected boolean` | `connected`
`protected org.jivesoftware.smack.XMPPConnection` | `connection`
`protected org.jivesoftware.smack.GroupChat` | `groupChat`
`protected java.lang.String` | `loginId`
`protected java.lang.String` | `password`
`protected boolean` | `secureConnection`
`protected java.lang.String` | `sessionHandle`
`protected java.lang.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, VM_ID, VM_ID_PROPERRTY`

Constructor Summary
`XMPPBridge(java.util.Collection localSubjects, java.lang.String externalSubject)` Creates an XMPPBridge.
`XMPPBridge(EventSubject localSubject, java.lang.String externalSubject)` Creates an XMPPBridge.

Method Summary
`java.lang.String` | `getChatService()`
`java.lang.String` | `getLoginId()`
`java.lang.String` | `getPassword()`
`java.lang.String` | `getSessionHandle()`
`java.lang.String` | `getXmppHost()`
`int` | `getXmppPort()`
`boolean` | `isSecureConnection()`
`protected void` | `sendExternalEvent(CayenneEvent localEvent)` Sends a Cayenne event over the transport supported by this bridge.
`void` | `setChatService(java.lang.String chatService)`
`void` | `setLoginId(java.lang.String loginId)`
`void` | `setPassword(java.lang.String password)`
`void` | `setSecureConnection(boolean secureConnection)`
`void` | `setSessionHandle(java.lang.String sessionHandle)`
`void` | `setXmppHost(java.lang.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, getLocalSubject, getLocalSubjects, isRunning, onExternalEvent, onLocalEvent, 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 java.lang.String loginId

### password

    protected java.lang.String password

### xmppHost

    protected java.lang.String xmppHost

### xmppPort

    protected int xmppPort

### chatService

    protected java.lang.String chatService

### sessionHandle

    protected java.lang.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,
                      java.lang.String externalSubject)

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

### XMPPBridge

    public XMPPBridge(java.util.Collection localSubjects,
                      java.lang.String externalSubject)

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

Method Detail

### getXmppHost

    public java.lang.String getXmppHost()

### setXmppHost

    public void setXmppHost(java.lang.String xmppHost)

### getXmppPort

    public int getXmppPort()

### setXmppPort

    public void setXmppPort(int xmppPort)

### getLoginId

    public java.lang.String getLoginId()

### setLoginId

    public void setLoginId(java.lang.String loginId)

### getPassword

    public java.lang.String getPassword()

### setPassword

    public void setPassword(java.lang.String password)

### isSecureConnection

    public boolean isSecureConnection()

### setSecureConnection

    public void setSecureConnection(boolean secureConnection)

### getChatService

    public java.lang.String getChatService()

### setChatService

    public void setChatService(java.lang.String chatService)

### getSessionHandle

    public java.lang.String getSessionHandle()

### setSessionHandle

    public void setSessionHandle(java.lang.String sessionHandle)

### startupExternal

    protected void startupExternal()
                            throws java.lang.Exception

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

  Specified by:
    `startupExternal` in class `EventBridge`
  Throws:
    `java.lang.Exception`

### shutdownExternal

    protected void shutdownExternal()
                             throws java.lang.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:
    `java.lang.Exception`

### sendExternalEvent

    protected void sendExternalEvent(CayenneEvent localEvent)
                              throws java.lang.Exception

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

  Specified by:
    `sendExternalEvent` in class `EventBridge`
  Throws:
    `java.lang.Exception`

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

Copyright © 2001-2006 Apache.org All Rights Reserved.