Package tigase.io
Class SocketIO
- java.lang.Object
-
- tigase.io.SocketIO
-
- All Implemented Interfaces:
IOInterface
public class SocketIO extends java.lang.Object implements IOInterface
Describe class SocketIO here.
Created: Sat May 14 07:18:30 2005- Author:
- Artur Hefczyc
-
-
Constructor Summary
Constructors Constructor Description SocketIO(java.nio.channels.SocketChannel sock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intbytesRead()booleancheckCapabilities(java.lang.String caps)longgetBuffOverflow(boolean reset)longgetBytesReceived(boolean reset)longgetBytesSent(boolean reset)intgetInputPacketSize()java.nio.channels.SocketChannelgetSocketChannel()voidgetStatistics(StatisticsList list, boolean reset)longgetTotalBuffOverflow()longgetTotalBytesReceived()longgetTotalBytesSent()booleanisConnected()booleanisRemoteAddress(java.lang.String addr)java.nio.ByteBufferread(java.nio.ByteBuffer buff)voidsetLogId(java.lang.String logId)voidstop()java.lang.StringtoString()booleanwaitingToSend()intwaitingToSendSize()intwrite(java.nio.ByteBuffer buff)
-
-
-
Method Detail
-
bytesRead
public int bytesRead()
- Specified by:
bytesReadin interfaceIOInterface
-
checkCapabilities
public boolean checkCapabilities(java.lang.String caps)
- Specified by:
checkCapabilitiesin interfaceIOInterface
-
getInputPacketSize
public int getInputPacketSize() throws java.io.IOException- Specified by:
getInputPacketSizein interfaceIOInterface- Throws:
java.io.IOException
-
getSocketChannel
public java.nio.channels.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(java.lang.String addr)
- Specified by:
isRemoteAddressin interfaceIOInterface
-
read
public java.nio.ByteBuffer read(java.nio.ByteBuffer buff) throws java.io.IOException- Specified by:
readin interfaceIOInterface- Throws:
java.io.IOException
-
stop
public void stop() throws java.io.IOException- Specified by:
stopin interfaceIOInterface- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
waitingToSend
public boolean waitingToSend()
- Specified by:
waitingToSendin interfaceIOInterface
-
waitingToSendSize
public int waitingToSendSize()
- Specified by:
waitingToSendSizein interfaceIOInterface
-
write
public int write(java.nio.ByteBuffer buff) throws java.io.IOException- Specified by:
writein interfaceIOInterface- Throws:
java.io.IOException
-
setLogId
public void setLogId(java.lang.String logId)
- Specified by:
setLogIdin interfaceIOInterface
-
-