Package tigase.extras.bcstarttls
Class BcTLSIO
- java.lang.Object
-
- tigase.extras.bcstarttls.BcTLSIO
-
- All Implemented Interfaces:
tigase.io.IOInterface,tigase.io.TLSIOIfc
public class BcTLSIO extends java.lang.Object implements tigase.io.IOInterface, tigase.io.TLSIOIfc
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTLS_CAPS
-
Constructor Summary
Constructors Constructor Description BcTLSIO(tigase.io.CertificateContainerIfc certificateContainer, tigase.io.TLSEventHandler eventHandler, tigase.io.IOInterface ioi, java.lang.String hostname, java.nio.ByteOrder order, boolean wantClientAuth, boolean needClientAuth, java.lang.String[] enabledCiphers, java.lang.String[] enabledProtocols, javax.net.ssl.TrustManager[] x509TrustManagers)
-
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(tigase.stats.StatisticsList list, boolean reset)longgetTotalBuffOverflow()longgetTotalBytesReceived()longgetTotalBytesSent()booleanisConnected()booleanisRemoteAddress(java.lang.String addr)voidprocessHandshake(byte[] data)java.nio.ByteBufferread(java.nio.ByteBuffer buff)voidsetLogId(java.lang.String logId)voidstop()java.lang.StringtoString()booleanwaitingToSend()intwaitingToSendSize()intwrite(java.nio.ByteBuffer buff)
-
-
-
Field Detail
-
TLS_CAPS
public static final java.lang.String TLS_CAPS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BcTLSIO
public BcTLSIO(tigase.io.CertificateContainerIfc certificateContainer, tigase.io.TLSEventHandler eventHandler, tigase.io.IOInterface ioi, java.lang.String hostname, java.nio.ByteOrder order, boolean wantClientAuth, boolean needClientAuth, java.lang.String[] enabledCiphers, java.lang.String[] enabledProtocols, javax.net.ssl.TrustManager[] x509TrustManagers) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
bytesRead
public int bytesRead()
- Specified by:
bytesReadin interfacetigase.io.IOInterface
-
checkCapabilities
public boolean checkCapabilities(java.lang.String caps)
- Specified by:
checkCapabilitiesin interfacetigase.io.IOInterface
-
getBuffOverflow
public long getBuffOverflow(boolean reset)
- Specified by:
getBuffOverflowin interfacetigase.io.IOInterface
-
getBytesReceived
public long getBytesReceived(boolean reset)
- Specified by:
getBytesReceivedin interfacetigase.io.IOInterface
-
getBytesSent
public long getBytesSent(boolean reset)
- Specified by:
getBytesSentin interfacetigase.io.IOInterface
-
getInputPacketSize
public int getInputPacketSize() throws java.io.IOException- Specified by:
getInputPacketSizein interfacetigase.io.IOInterface- Throws:
java.io.IOException
-
getSocketChannel
public java.nio.channels.SocketChannel getSocketChannel()
- Specified by:
getSocketChannelin interfacetigase.io.IOInterface
-
getStatistics
public void getStatistics(tigase.stats.StatisticsList list, boolean reset)- Specified by:
getStatisticsin interfacetigase.io.IOInterface
-
getTotalBuffOverflow
public long getTotalBuffOverflow()
- Specified by:
getTotalBuffOverflowin interfacetigase.io.IOInterface
-
getTotalBytesReceived
public long getTotalBytesReceived()
- Specified by:
getTotalBytesReceivedin interfacetigase.io.IOInterface
-
getTotalBytesSent
public long getTotalBytesSent()
- Specified by:
getTotalBytesSentin interfacetigase.io.IOInterface
-
isConnected
public boolean isConnected()
- Specified by:
isConnectedin interfacetigase.io.IOInterface
-
isRemoteAddress
public boolean isRemoteAddress(java.lang.String addr)
- Specified by:
isRemoteAddressin interfacetigase.io.IOInterface
-
read
public java.nio.ByteBuffer read(java.nio.ByteBuffer buff) throws java.io.IOException- Specified by:
readin interfacetigase.io.IOInterface- Throws:
java.io.IOException
-
setLogId
public void setLogId(java.lang.String logId)
- Specified by:
setLogIdin interfacetigase.io.IOInterface
-
stop
public void stop() throws java.io.IOException- Specified by:
stopin interfacetigase.io.IOInterface- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
waitingToSend
public boolean waitingToSend()
- Specified by:
waitingToSendin interfacetigase.io.IOInterface
-
waitingToSendSize
public int waitingToSendSize()
- Specified by:
waitingToSendSizein interfacetigase.io.IOInterface
-
write
public int write(java.nio.ByteBuffer buff) throws java.io.IOException- Specified by:
writein interfacetigase.io.IOInterface- Throws:
java.io.IOException
-
processHandshake
public void processHandshake(byte[] data) throws java.io.IOException- Specified by:
processHandshakein interfacetigase.io.TLSIOIfc- Throws:
java.io.IOException
-
-