com.sun.xml.ws.transport.tcp.io
Class Connection

java.lang.Object
  extended by com.sun.xml.ws.transport.tcp.io.Connection

public final class Connection
extends java.lang.Object


Constructor Summary
Connection(java.nio.channels.SocketChannel socketChannel)
           
 
Method Summary
 void close()
           
static Connection create(java.lang.String host, int port)
           
protected  void finalize()
           
 void flush()
           
 int getChannelId()
          Get channel id
 int getContentId()
          Get request/response contentId
 java.util.Map<java.lang.Integer,java.lang.String> getContentProperties()
          Get request content properties
 java.lang.String getHost()
           
static java.lang.String getHost(java.nio.channels.SocketChannel socketChannel)
           
 java.lang.String getLocalHost()
           
static java.lang.String getLocalHost(java.nio.channels.SocketChannel socketChannel)
           
 int getLocalPort()
           
static int getLocalPort(java.nio.channels.SocketChannel socketChannel)
           
 int getMessageId()
          Get request/response messageId of 1st frame
 int getPort()
           
static int getPort(java.nio.channels.SocketChannel socketChannel)
           
 java.nio.channels.SocketChannel getSocketChannel()
           
 boolean isDirectMode()
           
 java.io.InputStream openInputStream()
           
 java.io.OutputStream openOutputStream()
           
 void prepareForReading()
           
 void setChannelId(int channelId)
          Set channel id
 void setContentId(int contentId)
          Set request/response contentId
 void setContentProperty(int key, java.lang.String value)
          Set response content properties
 void setDirectMode(boolean isDirectMode)
           
 void setInputStreamByteBuffer(java.nio.ByteBuffer messageBuffer)
          Set messageBuffer for InputStream some message part could be preread before
 void setMessageId(int messageId)
          Set request/response messageId of 1st frame
 void setSocketChannel(java.nio.channels.SocketChannel socketChannel)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Connection

public Connection(java.nio.channels.SocketChannel socketChannel)
Method Detail

getSocketChannel

public java.nio.channels.SocketChannel getSocketChannel()

setSocketChannel

public void setSocketChannel(java.nio.channels.SocketChannel socketChannel)

prepareForReading

public void prepareForReading()
                       throws java.io.IOException
Throws:
java.io.IOException

openInputStream

public java.io.InputStream openInputStream()
                                    throws java.io.IOException
Throws:
java.io.IOException

openOutputStream

public java.io.OutputStream openOutputStream()
                                      throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException

isDirectMode

public boolean isDirectMode()

setDirectMode

public void setDirectMode(boolean isDirectMode)

getChannelId

public int getChannelId()
Get channel id


setChannelId

public void setChannelId(int channelId)
Set channel id


getMessageId

public int getMessageId()
Get request/response messageId of 1st frame


setMessageId

public void setMessageId(int messageId)
Set request/response messageId of 1st frame


getContentId

public int getContentId()
Get request/response contentId


setContentId

public void setContentId(int contentId)
Set request/response contentId


getContentProperties

public java.util.Map<java.lang.Integer,java.lang.String> getContentProperties()
Get request content properties


setContentProperty

public void setContentProperty(int key,
                               java.lang.String value)
Set response content properties


setInputStreamByteBuffer

public void setInputStreamByteBuffer(java.nio.ByteBuffer messageBuffer)
Set messageBuffer for InputStream some message part could be preread before


close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

create

public static Connection create(java.lang.String host,
                                int port)
                         throws java.io.IOException
Throws:
java.io.IOException

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

getHost

public java.lang.String getHost()

getPort

public int getPort()

getLocalHost

public java.lang.String getLocalHost()

getLocalPort

public int getLocalPort()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getHost

public static java.lang.String getHost(java.nio.channels.SocketChannel socketChannel)

getPort

public static int getPort(java.nio.channels.SocketChannel socketChannel)

getLocalHost

public static java.lang.String getLocalHost(java.nio.channels.SocketChannel socketChannel)

getLocalPort

public static int getLocalPort(java.nio.channels.SocketChannel socketChannel)