IBM Rational Performance Tester SDK

com.ibm.rational.test.lt.kernel.io
Interface IKernelChannel


public interface IKernelChannel


Method Summary
 void close()
           
 boolean connect(InetSocketAddress address)
           
 boolean connect(InetSocketAddress localAddress, InetSocketAddress remoteAddress)
           
 void debugHandshake(String s)
           
 boolean finishConnect()
           
 String getCipherSuite()
           
 InetSocketAddress getLocalAddress()
           
 int getLocalPort()
           
 int getPort()
           
 String getProtocol()
           
 InetSocketAddress getRemoteAddress()
           
 String getRequestedCipherSuite()
           
 String getRequestedProtocol()
           
 void handshake()
          Explicitly handshake with the server system.
 boolean isConnected()
           
 boolean isCryptoAvailable()
          is crypto engine alive and well on this channel
 boolean isMonitorPeerClose()
           
 boolean isSecure()
           
 boolean monitorPeerClose(boolean b)
           
 void open()
           
 void open(boolean blocking)
           
 int read(ByteBuffer buffer)
           
 void registerConnect(Selector s, Object o)
           
 SelectionKey registerRead(Selector s, Object o)
           
 void setCertificate(X509Certificate certificate)
           
 void setConnectTimeout(long connectTimeout)
           
 void setDestinationHostName(String hostName)
           
 void setDestinationPort(int port)
           
 void setKChannel(IKChannel kChannel)
           
 void setLocalAddress(InetSocketAddress local)
           
 void setReadTimeout(long readTimeout)
           
 void setSecure(String requestedProtocol, String requestedCipherSuite)
           
 void setWriteTimeout(long writeTimeout)
           
 boolean unwrap(int readCount, ByteBuffer buffer)
           
 int write(ByteBuffer buffer)
           
 

Method Detail

open

void open()
          throws IOException
Throws:
IOException

open

void open(boolean blocking)
          throws IOException
Throws:
IOException

setSecure

void setSecure(String requestedProtocol,
               String requestedCipherSuite)

isSecure

boolean isSecure()

isCryptoAvailable

boolean isCryptoAvailable()
is crypto engine alive and well on this channel


getCipherSuite

String getCipherSuite()

getProtocol

String getProtocol()

getRequestedCipherSuite

String getRequestedCipherSuite()

getRequestedProtocol

String getRequestedProtocol()

setCertificate

void setCertificate(X509Certificate certificate)

getRemoteAddress

InetSocketAddress getRemoteAddress()

getLocalAddress

InetSocketAddress getLocalAddress()

getPort

int getPort()

getLocalPort

int getLocalPort()

isConnected

boolean isConnected()

setConnectTimeout

void setConnectTimeout(long connectTimeout)

registerConnect

void registerConnect(Selector s,
                     Object o)
                     throws ClosedChannelException,
                            com.ibm.rational.test.lt.kernel.io.KMonitoredChannelException
Throws:
ClosedChannelException
com.ibm.rational.test.lt.kernel.io.KMonitoredChannelException

connect

boolean connect(InetSocketAddress address)
                throws Exception
Throws:
Exception

connect

boolean connect(InetSocketAddress localAddress,
                InetSocketAddress remoteAddress)
                throws Exception
Throws:
Exception

finishConnect

boolean finishConnect()
                      throws IOException
Throws:
IOException

handshake

void handshake()
               throws Exception
Explicitly handshake with the server system.

This should not be called as a matter of course. If the KChannel was configured for SSL before the call to connect(), the handshake would occur automatically before the handleConnect() callback is called.

If the original connect was made without SSL enabled (as is the case with SSL over a Proxy), the channel can be converted to a secure channel by calling setSecure(...) and then handshake().

Throws:
Exception - if the channel fails to handshake properly
See Also:
IKernelChannel.setSecure(String, String), IKChannel.connect(InetSocketAddress), IKChannel.handleConnect(Throwable)

setWriteTimeout

void setWriteTimeout(long writeTimeout)

write

int write(ByteBuffer buffer)
          throws Exception
Throws:
Exception
See Also:
WritableByteChannel.write(ByteBuffer)

setReadTimeout

void setReadTimeout(long readTimeout)

registerRead

SelectionKey registerRead(Selector s,
                          Object o)
                          throws ClosedChannelException,
                                 com.ibm.rational.test.lt.kernel.io.KMonitoredChannelException
Throws:
ClosedChannelException
com.ibm.rational.test.lt.kernel.io.KMonitoredChannelException

read

int read(ByteBuffer buffer)
         throws Exception
Throws:
Exception

unwrap

boolean unwrap(int readCount,
               ByteBuffer buffer)
               throws Exception
Throws:
Exception

close

void close()
           throws IOException
Throws:
IOException

monitorPeerClose

boolean monitorPeerClose(boolean b)

isMonitorPeerClose

boolean isMonitorPeerClose()

setLocalAddress

void setLocalAddress(InetSocketAddress local)

debugHandshake

void debugHandshake(String s)

setKChannel

void setKChannel(IKChannel kChannel)

setDestinationHostName

void setDestinationHostName(String hostName)

setDestinationPort

void setDestinationPort(int port)

IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2012. All rights reserved.