Class Socks5IOService<RefObject>
java.lang.Object
tigase.net.IOService<RefObject>
tigase.socks5.Socks5IOService<RefObject>
- All Implemented Interfaces:
Callable<tigase.net.IOService<?>>, tigase.io.TLSEventHandler, tigase.util.IOListener
public class Socks5IOService<RefObject>
extends tigase.net.IOService<RefObject>
- Author:
- andrzej
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAll possible states of Socks5 connection -
Field Summary
FieldsFields inherited from class tigase.net.IOService
cb, CERT_CHECK_RESULT, CERT_REQUIRED_DOMAIN, decoder, encoder, HOSTNAME_KEY, LOCAL_CERT_CHECK_RESULT, partialCharacterBytes, PORT_TYPE_PROP_KEY, SESSION_ID_KEY, SSL_PROTOCOLS_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanactivate()Activate servicetigase.net.IOService<?> call()voidintGet all bytes received by this serviceintGet all bytes sent by this servicetigase.xmpp.jid.JIDgetJID()Returns jid of client connected by this serviceReturns Socks5 connectionType (Requester/Target)getState()Returns current state of serviceinthashCode()Custom hashCode for better distribution Sender and recipient thread should be processed on same threadprotected voidHandles data from socketvoidprotected ByteBuffer/ buf.clear();protected intvoidSet ConnectionManagervoidsetSocks5ConnectionType(Socks5ConnectionType connectionType) Set Socks5 connection type (Requester or Target connection)voidSet stream assigned with this servicebooleanvoidwriteBytes(ByteBuffer buf) protected voidMethods inherited from class tigase.net.IOService
accept, byteOrder, checkBufferLimit, connectionType, debug, debug, getBuffOverflow, getBytesReceived, getBytesSent, getCertificateContainer, getConnectionId, getDataReceiver, getIO, getLastTransferTime, getLocalAddress, getLocalCertificate, getLocalPort, getPeerCertificate, getReadCounters, getRefObject, getRemoteAddress, getSessionData, getSocketChannel, getSocketInputSize, getStatistics, getTlsUniqueId, getTotalBuffOverflow, getTotalBytesReceived, getTotalBytesSent, getUniqueId, getWriteCounters, handleMalformedInput, handshakeCompleted, isConnected, isInputBufferEmpty, isSocketServiceReady, readCompleted, readData, setBufferLimit, setCertificateContainer, setConnectionId, setDataReceiver, setIOServiceListener, setRefObject, setSessionData, setSocketServiceReady, setSslContextContainer, setX509TrustManagers, startSSL, startTLS, startZLib, stop, toString, waitingToSend, waitingToSendSize
-
Field Details
-
transferInProgress
-
-
Constructor Details
-
Socks5IOService
public Socks5IOService()
-
-
Method Details
-
activate
public boolean activate()Activate service- Returns:
-
setConnectionManager
Set ConnectionManager- Parameters:
manager-
-
setStream
-
getJID
public tigase.xmpp.jid.JID getJID()Returns jid of client connected by this service- Returns:
-
getState
-
getSocks5ConnectionType
Returns Socks5 connectionType (Requester/Target)- Returns:
-
setSocks5ConnectionType
Set Socks5 connection type (Requester or Target connection)- Parameters:
connectionType-
-
getBytesReceived
public int getBytesReceived()Get all bytes received by this service- Returns:
-
getBytesSent
public int getBytesSent()Get all bytes sent by this service- Returns:
-
processWaitingPackets
- Specified by:
processWaitingPacketsin classtigase.net.IOService<RefObject>- Throws:
IOException
-
waitingToRead
public boolean waitingToRead()- Overrides:
waitingToReadin classtigase.net.IOService<RefObject>
-
call
- Specified by:
callin interfaceCallable<RefObject>- Overrides:
callin classtigase.net.IOService<RefObject>- Throws:
IOException
-
writeBytes
- Overrides:
writeBytesin classtigase.net.IOService<RefObject>
-
forceStop
public void forceStop()- Overrides:
forceStopin classtigase.net.IOService<RefObject>
-
hashCode
-
readBytes
/ buf.clear();- Overrides:
readBytesin classtigase.net.IOService<RefObject>- Throws:
IOException
-
writeData
-
processSocketData
Handles data from socket- Specified by:
processSocketDatain classtigase.net.IOService<RefObject>- Throws:
IOException
-
receivedPackets
protected int receivedPackets()- Specified by:
receivedPacketsin classtigase.net.IOService<RefObject>
-