tigase.jaxmpp.core.client.connector
Class ConnectorWrapper

java.lang.Object
  extended by tigase.jaxmpp.core.client.connector.ConnectorWrapper
All Implemented Interfaces:
Connector

public class ConnectorWrapper
extends Object
implements Connector


Nested Class Summary
 
Nested classes/interfaces inherited from interface tigase.jaxmpp.core.client.Connector
Connector.ConnectorEvent, Connector.State
 
Field Summary
protected  Observable observable
           
 
Fields inherited from interface tigase.jaxmpp.core.client.Connector
BodyReceived, Connected, CONNECTOR_STAGE_KEY, DISABLE_KEEPALIVE_KEY, ENCRYPTED_KEY, EncryptionEstablished, Error, EXTERNAL_KEEPALIVE_KEY, SEE_OTHER_HOST_KEY, StanzaReceived, StanzaSending, StateChanged, StreamTerminated, TRUST_MANAGERS_KEY
 
Constructor Summary
ConnectorWrapper(Observable parentObservable)
           
 
Method Summary
 void addListener(EventType eventType, Listener<? extends Connector.ConnectorEvent> listener)
          Adds a listener bound by the given event type.
 void addListener(Listener<? extends BaseEvent> listener)
           
 XmppSessionLogic createSessionLogic(XmppModulesManager modulesManager, PacketWriter writer)
          Returns instance of XmppSessionLogic to work with this connector.
 Connector getConnector()
           
 Observable getObservable()
          Returns observable
 Connector.State getState()
           
 boolean isSecure()
           
 void keepalive()
          Whitespace ping.
 void removeAllListeners()
          Deprecated. 
 void removeListener(EventType eventType, Listener<Connector.ConnectorEvent> listener)
           
 void restartStream()
           
 void send(Element stanza)
           
 void setConnector(Connector connector)
           
 void setObservable(Observable observable)
           
 void start()
           
 void stop()
           
 void stop(boolean terminate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

observable

protected final Observable observable
Constructor Detail

ConnectorWrapper

public ConnectorWrapper(Observable parentObservable)
Method Detail

addListener

public void addListener(EventType eventType,
                        Listener<? extends Connector.ConnectorEvent> listener)
Description copied from interface: Connector
Adds a listener bound by the given event type.

Specified by:
addListener in interface Connector
Parameters:
eventType - type of event
listener - the listener

addListener

public void addListener(Listener<? extends BaseEvent> listener)

createSessionLogic

public XmppSessionLogic createSessionLogic(XmppModulesManager modulesManager,
                                           PacketWriter writer)
Description copied from interface: Connector
Returns instance of XmppSessionLogic to work with this connector.

Specified by:
createSessionLogic in interface Connector
Parameters:
modulesManager - module manager
writer - writer
Returns:
XmppSessionLogic

getConnector

public Connector getConnector()

getObservable

public Observable getObservable()
Description copied from interface: Connector
Returns observable

Specified by:
getObservable in interface Connector
Returns:

getState

public Connector.State getState()
Specified by:
getState in interface Connector

isSecure

public boolean isSecure()
Specified by:
isSecure in interface Connector

keepalive

public void keepalive()
               throws JaxmppException
Description copied from interface: Connector
Whitespace ping.

Specified by:
keepalive in interface Connector
Throws:
JaxmppException

removeAllListeners

@Deprecated
public void removeAllListeners()
Deprecated. 

Specified by:
removeAllListeners in interface Connector

removeListener

public void removeListener(EventType eventType,
                           Listener<Connector.ConnectorEvent> listener)
Specified by:
removeListener in interface Connector

restartStream

public void restartStream()
                   throws XMLException,
                          JaxmppException
Specified by:
restartStream in interface Connector
Throws:
XMLException
JaxmppException

send

public void send(Element stanza)
          throws XMLException,
                 JaxmppException
Specified by:
send in interface Connector
Throws:
XMLException
JaxmppException

setConnector

public void setConnector(Connector connector)

setObservable

public void setObservable(Observable observable)
Specified by:
setObservable in interface Connector

start

public void start()
           throws XMLException,
                  JaxmppException
Specified by:
start in interface Connector
Throws:
XMLException
JaxmppException

stop

public void stop()
          throws XMLException,
                 JaxmppException
Specified by:
stop in interface Connector
Throws:
XMLException
JaxmppException

stop

public void stop(boolean terminate)
          throws XMLException,
                 JaxmppException
Specified by:
stop in interface Connector
Throws:
XMLException
JaxmppException


Copyright © 2006-2012 Tigase. All Rights Reserved.