tigase.jaxmpp.j2se.connectors.socket
Class SocketConnector

java.lang.Object
  extended by tigase.jaxmpp.j2se.connectors.socket.SocketConnector
All Implemented Interfaces:
tigase.jaxmpp.core.client.Connector

public class SocketConnector
extends Object
implements tigase.jaxmpp.core.client.Connector


Nested Class Summary
static interface SocketConnector.DnsResolver
           
static class SocketConnector.Entry
           
static class SocketConnector.SocketConnectorEvent
           
 
Nested classes/interfaces inherited from interface tigase.jaxmpp.core.client.Connector
tigase.jaxmpp.core.client.Connector.ConnectorEvent, tigase.jaxmpp.core.client.Connector.State
 
Field Summary
static tigase.jaxmpp.core.client.observer.EventType HostChanged
          see-other-host
protected  tigase.jaxmpp.core.client.observer.Observable observable
           
static String SERVER_HOST
           
static String SERVER_PORT
           
static String SSL_SOCKET_FACTORY_KEY
           
static String TLS_DISABLED_KEY
           
 
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
SocketConnector(tigase.jaxmpp.core.client.observer.Observable parentObservable, tigase.jaxmpp.core.client.SessionObject sessionObject2)
           
 
Method Summary
 void addListener(tigase.jaxmpp.core.client.observer.EventType eventType, tigase.jaxmpp.core.client.observer.Listener<? extends tigase.jaxmpp.core.client.Connector.ConnectorEvent> listener)
           
 void addListener(tigase.jaxmpp.core.client.observer.Listener<? extends tigase.jaxmpp.core.client.observer.BaseEvent> listener)
           
 tigase.jaxmpp.core.client.XmppSessionLogic createSessionLogic(tigase.jaxmpp.core.client.XmppModulesManager modulesManager, tigase.jaxmpp.core.client.PacketWriter writer)
           
protected  void fireOnConnected(tigase.jaxmpp.core.client.SessionObject sessionObject)
           
protected  void fireOnError(tigase.jaxmpp.core.client.xml.Element response, Throwable caught, tigase.jaxmpp.core.client.SessionObject sessionObject)
           
protected  void fireOnStanzaReceived(tigase.jaxmpp.core.client.xml.Element response, tigase.jaxmpp.core.client.SessionObject sessionObject)
           
protected  void fireOnTerminate(tigase.jaxmpp.core.client.SessionObject sessionObject)
           
 tigase.jaxmpp.core.client.observer.Observable getObservable()
           
 tigase.jaxmpp.core.client.Connector.State getState()
          
 boolean isSecure()
           
static boolean isTLSAvailable(tigase.jaxmpp.core.client.SessionObject sessionObject)
           
 void keepalive()
           
protected  void onError(tigase.jaxmpp.core.client.xml.Element response, Throwable caught)
           
protected  void onErrorInThread(Exception e)
           
protected  void onResponse(tigase.jaxmpp.core.client.xml.Element response)
           
protected  void onStreamStart(Map<String,String> attribs)
           
protected  void onStreamTerminate()
           
 void onTLSStanza(tigase.xml.Element elem)
           
protected  void proceedTLS()
           
 void processElement(tigase.xml.Element elem)
           
 void removeAllListeners()
           
 void removeListener(tigase.jaxmpp.core.client.observer.EventType eventType, tigase.jaxmpp.core.client.observer.Listener<tigase.jaxmpp.core.client.Connector.ConnectorEvent> listener)
           
 void restartStream()
           
 void send(byte[] buffer)
           
 void send(tigase.jaxmpp.core.client.xml.Element stanza)
           
 void setObservable(tigase.jaxmpp.core.client.observer.Observable observable)
           
protected  void setStage(tigase.jaxmpp.core.client.Connector.State state)
           
 void start()
           
 void startTLS()
           
 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

HostChanged

public static final tigase.jaxmpp.core.client.observer.EventType HostChanged
see-other-host


SERVER_HOST

public static final String SERVER_HOST
See Also:
Constant Field Values

SERVER_PORT

public static final String SERVER_PORT
See Also:
Constant Field Values

SSL_SOCKET_FACTORY_KEY

public static final String SSL_SOCKET_FACTORY_KEY
See Also:
Constant Field Values

TLS_DISABLED_KEY

public static final String TLS_DISABLED_KEY
See Also:
Constant Field Values

observable

protected tigase.jaxmpp.core.client.observer.Observable observable
Constructor Detail

SocketConnector

public SocketConnector(tigase.jaxmpp.core.client.observer.Observable parentObservable,
                       tigase.jaxmpp.core.client.SessionObject sessionObject2)
Method Detail

isTLSAvailable

public static boolean isTLSAvailable(tigase.jaxmpp.core.client.SessionObject sessionObject)
                              throws tigase.jaxmpp.core.client.xml.XMLException
Throws:
tigase.jaxmpp.core.client.xml.XMLException

addListener

public void addListener(tigase.jaxmpp.core.client.observer.EventType eventType,
                        tigase.jaxmpp.core.client.observer.Listener<? extends tigase.jaxmpp.core.client.Connector.ConnectorEvent> listener)
Specified by:
addListener in interface tigase.jaxmpp.core.client.Connector

addListener

public void addListener(tigase.jaxmpp.core.client.observer.Listener<? extends tigase.jaxmpp.core.client.observer.BaseEvent> listener)

createSessionLogic

public tigase.jaxmpp.core.client.XmppSessionLogic createSessionLogic(tigase.jaxmpp.core.client.XmppModulesManager modulesManager,
                                                                     tigase.jaxmpp.core.client.PacketWriter writer)
Specified by:
createSessionLogic in interface tigase.jaxmpp.core.client.Connector

fireOnConnected

protected void fireOnConnected(tigase.jaxmpp.core.client.SessionObject sessionObject)
                        throws tigase.jaxmpp.core.client.exceptions.JaxmppException
Throws:
tigase.jaxmpp.core.client.exceptions.JaxmppException

fireOnError

protected void fireOnError(tigase.jaxmpp.core.client.xml.Element response,
                           Throwable caught,
                           tigase.jaxmpp.core.client.SessionObject sessionObject)
                    throws tigase.jaxmpp.core.client.exceptions.JaxmppException
Throws:
tigase.jaxmpp.core.client.exceptions.JaxmppException

fireOnStanzaReceived

protected void fireOnStanzaReceived(tigase.jaxmpp.core.client.xml.Element response,
                                    tigase.jaxmpp.core.client.SessionObject sessionObject)
                             throws tigase.jaxmpp.core.client.exceptions.JaxmppException
Throws:
tigase.jaxmpp.core.client.exceptions.JaxmppException

fireOnTerminate

protected void fireOnTerminate(tigase.jaxmpp.core.client.SessionObject sessionObject)
                        throws tigase.jaxmpp.core.client.exceptions.JaxmppException
Throws:
tigase.jaxmpp.core.client.exceptions.JaxmppException

getObservable

public tigase.jaxmpp.core.client.observer.Observable getObservable()
Specified by:
getObservable in interface tigase.jaxmpp.core.client.Connector

getState

public tigase.jaxmpp.core.client.Connector.State getState()

Specified by:
getState in interface tigase.jaxmpp.core.client.Connector

isSecure

public boolean isSecure()
Specified by:
isSecure in interface tigase.jaxmpp.core.client.Connector

keepalive

public void keepalive()
               throws tigase.jaxmpp.core.client.exceptions.JaxmppException
Specified by:
keepalive in interface tigase.jaxmpp.core.client.Connector
Throws:
tigase.jaxmpp.core.client.exceptions.JaxmppException

onError

protected void onError(tigase.jaxmpp.core.client.xml.Element response,
                       Throwable caught)
                throws tigase.jaxmpp.core.client.exceptions.JaxmppException
Throws:
tigase.jaxmpp.core.client.exceptions.JaxmppException

onErrorInThread

protected void onErrorInThread(Exception e)
                        throws tigase.jaxmpp.core.client.exceptions.JaxmppException
Throws:
tigase.jaxmpp.core.client.exceptions.JaxmppException

onResponse

protected void onResponse(tigase.jaxmpp.core.client.xml.Element response)
                   throws tigase.jaxmpp.core.client.exceptions.JaxmppException
Throws:
tigase.jaxmpp.core.client.exceptions.JaxmppException

onStreamStart

protected void onStreamStart(Map<String,String> attribs)

onStreamTerminate

protected void onStreamTerminate()
                          throws tigase.jaxmpp.core.client.exceptions.JaxmppException
Throws:
tigase.jaxmpp.core.client.exceptions.JaxmppException

onTLSStanza

public void onTLSStanza(tigase.xml.Element elem)
                 throws tigase.jaxmpp.core.client.exceptions.JaxmppException
Throws:
tigase.jaxmpp.core.client.exceptions.JaxmppException

proceedTLS

protected void proceedTLS()
                   throws tigase.jaxmpp.core.client.exceptions.JaxmppException
Throws:
tigase.jaxmpp.core.client.exceptions.JaxmppException

processElement

public void processElement(tigase.xml.Element elem)
                    throws tigase.jaxmpp.core.client.exceptions.JaxmppException
Throws:
tigase.jaxmpp.core.client.exceptions.JaxmppException

removeAllListeners

public void removeAllListeners()
Specified by:
removeAllListeners in interface tigase.jaxmpp.core.client.Connector

removeListener

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

restartStream

public void restartStream()
                   throws tigase.jaxmpp.core.client.xml.XMLException,
                          tigase.jaxmpp.core.client.exceptions.JaxmppException
Specified by:
restartStream in interface tigase.jaxmpp.core.client.Connector
Throws:
tigase.jaxmpp.core.client.xml.XMLException
tigase.jaxmpp.core.client.exceptions.JaxmppException

send

public void send(byte[] buffer)
          throws tigase.jaxmpp.core.client.exceptions.JaxmppException
Throws:
tigase.jaxmpp.core.client.exceptions.JaxmppException

send

public void send(tigase.jaxmpp.core.client.xml.Element stanza)
          throws tigase.jaxmpp.core.client.xml.XMLException,
                 tigase.jaxmpp.core.client.exceptions.JaxmppException
Specified by:
send in interface tigase.jaxmpp.core.client.Connector
Throws:
tigase.jaxmpp.core.client.xml.XMLException
tigase.jaxmpp.core.client.exceptions.JaxmppException

setObservable

public void setObservable(tigase.jaxmpp.core.client.observer.Observable observable)
Specified by:
setObservable in interface tigase.jaxmpp.core.client.Connector

setStage

protected void setStage(tigase.jaxmpp.core.client.Connector.State state)
                 throws tigase.jaxmpp.core.client.exceptions.JaxmppException
Throws:
tigase.jaxmpp.core.client.exceptions.JaxmppException

start

public void start()
           throws tigase.jaxmpp.core.client.xml.XMLException,
                  tigase.jaxmpp.core.client.exceptions.JaxmppException
Specified by:
start in interface tigase.jaxmpp.core.client.Connector
Throws:
tigase.jaxmpp.core.client.xml.XMLException
tigase.jaxmpp.core.client.exceptions.JaxmppException

startTLS

public void startTLS()
              throws tigase.jaxmpp.core.client.exceptions.JaxmppException
Throws:
tigase.jaxmpp.core.client.exceptions.JaxmppException

stop

public void stop()
          throws tigase.jaxmpp.core.client.exceptions.JaxmppException
Specified by:
stop in interface tigase.jaxmpp.core.client.Connector
Throws:
tigase.jaxmpp.core.client.exceptions.JaxmppException

stop

public void stop(boolean terminate)
          throws tigase.jaxmpp.core.client.exceptions.JaxmppException
Specified by:
stop in interface tigase.jaxmpp.core.client.Connector
Throws:
tigase.jaxmpp.core.client.exceptions.JaxmppException


Copyright © 2006-2012 Tigase. All Rights Reserved.