public class Socks5IOService<RefObject>
extends tigase.net.IOService<RefObject>
| Modifier and Type | Class and Description |
|---|---|
static class |
Socks5IOService.State
All possible states of Socks5 connection
|
| Modifier and Type | Field and Description |
|---|---|
protected ReentrantLock |
transferInProgress |
| Constructor and Description |
|---|
Socks5IOService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
activate()
Activate service
|
tigase.net.IOService<?> |
call() |
void |
forceStop() |
int |
getBytesReceived()
Get all bytes received by this service
|
int |
getBytesSent()
Get all bytes sent by this service
|
tigase.xmpp.jid.JID |
getJID()
Returns jid of client connected by this service
|
Socks5ConnectionType |
getSocks5ConnectionType()
Returns Socks5 connectionType (Requester/Target)
|
Socks5IOService.State |
getState()
Returns current state of service
|
int |
hashCode()
Custom hashCode for better distribution Sender and recipient thread should be processed on same thread
|
protected void |
processSocketData()
Handles data from socket
|
void |
processWaitingPackets() |
protected ByteBuffer |
readBytes() |
protected int |
receivedPackets() |
void |
setConnectionManager(Socks5ConnectionManager manager)
Set ConnectionManager
|
void |
setSocks5ConnectionType(Socks5ConnectionType connectionType)
Set Socks5 connection type (Requester or Target connection)
|
void |
setStream(Stream stream)
Set stream assigned with this service
|
boolean |
waitingToRead() |
void |
writeBytes(ByteBuffer buf) |
protected void |
writeData(String data) |
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, waitingToSendSizeprotected final ReentrantLock transferInProgress
public boolean activate()
public void setConnectionManager(Socks5ConnectionManager manager)
manager - public void setStream(Stream stream)
stream - public tigase.xmpp.jid.JID getJID()
public Socks5IOService.State getState()
public Socks5ConnectionType getSocks5ConnectionType()
public void setSocks5ConnectionType(Socks5ConnectionType connectionType)
connectionType - public int getBytesReceived()
public int getBytesSent()
public void processWaitingPackets()
throws IOException
processWaitingPackets in class tigase.net.IOService<RefObject>IOExceptionpublic boolean waitingToRead()
waitingToRead in class tigase.net.IOService<RefObject>public tigase.net.IOService<?> call()
throws IOException
call in interface Callable<tigase.net.IOService<?>>call in class tigase.net.IOService<RefObject>IOExceptionpublic void writeBytes(ByteBuffer buf)
writeBytes in class tigase.net.IOService<RefObject>public void forceStop()
forceStop in class tigase.net.IOService<RefObject>public int hashCode()
protected ByteBuffer readBytes() throws IOException
readBytes in class tigase.net.IOService<RefObject>IOExceptionprotected void writeData(String data)
writeData in class tigase.net.IOService<RefObject>protected void processSocketData()
throws IOException
processSocketData in class tigase.net.IOService<RefObject>IOExceptionprotected int receivedPackets()
receivedPackets in class tigase.net.IOService<RefObject>Copyright © 2011–2019 Tigase. All rights reserved.