public abstract class Socks5ConnectionManager extends Object implements ConnectionManager
| Modifier and Type | Class and Description |
|---|---|
static class |
Socks5ConnectionManager.State |
ConnectionManager.ConnectionClosedHandler, ConnectionManager.ConnectionEstablishedHandler, ConnectionManager.ConnectionFailedHandler, ConnectionManager.InitializedCallback| Modifier and Type | Field and Description |
|---|---|
protected tigase.jaxmpp.core.client.Context |
context |
protected static String |
JAXMPP_KEY |
static String |
PACKET_ID |
protected static String |
PROXY_JID_KEY |
protected static String |
PROXY_JID_USED_KEY |
protected static String |
SID_KEY |
protected static String |
STREAMHOST_KEY |
| Constructor and Description |
|---|
Socks5ConnectionManager() |
| Modifier and Type | Method and Description |
|---|---|
protected static boolean |
checkHash(String data,
tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session) |
protected static void |
clearSessions() |
protected void |
connectToProxy(tigase.jaxmpp.core.client.JaxmppCore jaxmpp,
tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session,
String sid,
tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionEndpoint host) |
void |
discoverProxy(tigase.jaxmpp.core.client.JaxmppCore jaxmpp,
tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session,
ConnectionManager.InitializedCallback callback) |
protected void |
fireOnConnected(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session) |
protected void |
fireOnConnected(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session,
Socket socket) |
protected void |
fireOnFailure(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session) |
protected static String |
generateHash(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session) |
protected List<tigase.jaxmpp.core.client.xmpp.modules.socks5.Streamhost> |
getLocalStreamHosts(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session,
String sid) |
protected static tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession |
getSession(String hash) |
protected void |
handleConnection(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session,
Socket socket,
boolean incoming) |
protected static Socks5ConnectionManager.State |
processData(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession ft,
SocketChannel socket,
Socks5ConnectionManager.State state,
ByteBuffer buf) |
protected void |
proxyDiscoveryError(tigase.jaxmpp.core.client.JaxmppCore jaxmpp,
tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession ft,
ConnectionManager.InitializedCallback callback,
String errorText) |
protected void |
proxyDiscoveryFinished(tigase.jaxmpp.core.client.JaxmppCore jaxmpp,
tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession ft,
ConnectionManager.InitializedCallback callback,
List<tigase.jaxmpp.core.client.JID> proxyComponents) |
protected static void |
registerSession(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session,
String sid,
Socks5ConnectionManager instance) |
protected void |
requestActivate(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session,
Socket socket) |
void |
setContext(tigase.jaxmpp.core.client.Context context) |
protected static void |
unregisterSession(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnectTcp, connectUdp, initConnectionpublic static final String PACKET_ID
protected static final String JAXMPP_KEY
protected static final String PROXY_JID_KEY
protected static final String PROXY_JID_USED_KEY
protected static final String SID_KEY
protected static final String STREAMHOST_KEY
protected tigase.jaxmpp.core.client.Context context
protected static boolean checkHash(String data, tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session)
protected static void clearSessions()
protected static String generateHash(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session)
protected static tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession getSession(String hash)
protected static Socks5ConnectionManager.State processData(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession ft, SocketChannel socket, Socks5ConnectionManager.State state, ByteBuffer buf) throws IOException
IOExceptionprotected static void registerSession(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session,
String sid,
Socks5ConnectionManager instance)
protected static void unregisterSession(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session)
protected void connectToProxy(tigase.jaxmpp.core.client.JaxmppCore jaxmpp,
tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session,
String sid,
tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionEndpoint host)
throws IOException,
tigase.jaxmpp.core.client.exceptions.JaxmppException
IOExceptiontigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic void discoverProxy(tigase.jaxmpp.core.client.JaxmppCore jaxmpp,
tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session,
ConnectionManager.InitializedCallback callback)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionprotected void fireOnConnected(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session)
protected void fireOnConnected(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session,
Socket socket)
protected void fireOnFailure(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session)
protected List<tigase.jaxmpp.core.client.xmpp.modules.socks5.Streamhost> getLocalStreamHosts(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session, String sid) throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionprotected void handleConnection(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session,
Socket socket,
boolean incoming)
throws IOException
IOExceptionprotected void proxyDiscoveryError(tigase.jaxmpp.core.client.JaxmppCore jaxmpp,
tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession ft,
ConnectionManager.InitializedCallback callback,
String errorText)
protected void proxyDiscoveryFinished(tigase.jaxmpp.core.client.JaxmppCore jaxmpp,
tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession ft,
ConnectionManager.InitializedCallback callback,
List<tigase.jaxmpp.core.client.JID> proxyComponents)
protected void requestActivate(tigase.jaxmpp.core.client.xmpp.modules.connection.ConnectionSession session,
Socket socket)
throws tigase.jaxmpp.core.client.exceptions.JaxmppException
tigase.jaxmpp.core.client.exceptions.JaxmppExceptionpublic void setContext(tigase.jaxmpp.core.client.Context context)
setContext in interface tigase.jaxmpp.core.client.xmpp.modules.ContextAwareCopyright © 2006–2017 Tigase. All rights reserved.