Package tigase.io
Class SocketIO
- java.lang.Object
-
- tigase.io.SocketIO
-
- All Implemented Interfaces:
IOInterface
public class SocketIO extends Object implements IOInterface
Describe class SocketIO here.
Created: Sat May 14 07:18:30 2005- Version:
- $Rev$
- Author:
- Artur Hefczyc
-
-
Constructor Summary
Constructors Constructor Description SocketIO(SocketChannel sock)Creates a newSocketIOinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intbytesRead()booleancheckCapabilities(String caps)longgetBuffOverflow(boolean reset)longgetBytesReceived(boolean reset)longgetBytesSent(boolean reset)intgetInputPacketSize()SocketChannelgetSocketChannel()voidgetStatistics(StatisticsList list, boolean reset)longgetTotalBuffOverflow()longgetTotalBytesReceived()longgetTotalBytesSent()booleanisConnected()booleanisRemoteAddress(String addr)ByteBufferread(ByteBuffer buff)voidsetLogId(String logId)voidstop()StringtoString()booleanwaitingToSend()intwaitingToSendSize()intwrite(ByteBuffer buff)
-
-
-
Constructor Detail
-
SocketIO
public SocketIO(SocketChannel sock) throws IOException
Creates a newSocketIOinstance.- Parameters:
sock-- Throws:
IOException
-
-
Method Detail
-
bytesRead
public int bytesRead()
- Specified by:
bytesReadin interfaceIOInterface
-
checkCapabilities
public boolean checkCapabilities(String caps)
- Specified by:
checkCapabilitiesin interfaceIOInterface
-
getInputPacketSize
public int getInputPacketSize() throws IOException- Specified by:
getInputPacketSizein interfaceIOInterface- Throws:
IOException
-
getSocketChannel
public SocketChannel getSocketChannel()
- Specified by:
getSocketChannelin interfaceIOInterface
-
getStatistics
public void getStatistics(StatisticsList list, boolean reset)
- Specified by:
getStatisticsin interfaceIOInterface
-
getBytesSent
public long getBytesSent(boolean reset)
- Specified by:
getBytesSentin interfaceIOInterface
-
getTotalBytesSent
public long getTotalBytesSent()
- Specified by:
getTotalBytesSentin interfaceIOInterface
-
getBytesReceived
public long getBytesReceived(boolean reset)
- Specified by:
getBytesReceivedin interfaceIOInterface
-
getTotalBytesReceived
public long getTotalBytesReceived()
- Specified by:
getTotalBytesReceivedin interfaceIOInterface
-
getBuffOverflow
public long getBuffOverflow(boolean reset)
- Specified by:
getBuffOverflowin interfaceIOInterface
-
getTotalBuffOverflow
public long getTotalBuffOverflow()
- Specified by:
getTotalBuffOverflowin interfaceIOInterface
-
isConnected
public boolean isConnected()
- Specified by:
isConnectedin interfaceIOInterface
-
isRemoteAddress
public boolean isRemoteAddress(String addr)
- Specified by:
isRemoteAddressin interfaceIOInterface
-
read
public ByteBuffer read(ByteBuffer buff) throws IOException
- Specified by:
readin interfaceIOInterface- Throws:
IOException
-
stop
public void stop() throws IOException- Specified by:
stopin interfaceIOInterface- Throws:
IOException
-
waitingToSend
public boolean waitingToSend()
- Specified by:
waitingToSendin interfaceIOInterface
-
waitingToSendSize
public int waitingToSendSize()
- Specified by:
waitingToSendSizein interfaceIOInterface
-
write
public int write(ByteBuffer buff) throws IOException
- Specified by:
writein interfaceIOInterface- Throws:
IOException
-
setLogId
public void setLogId(String logId)
- Specified by:
setLogIdin interfaceIOInterface
-
-