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 Object

Author:
Alexey Stashok

Constructor Summary
Connection(SocketChannel socketChannel)
           
 
Method Summary
 void close()
           
static Connection create(String host, int port)
           
protected  void finalize()
           
 void flush()
           
 int getChannelId()
          Get channel id
 int getContentId()
          Get request/response contentId
 Map<Integer,String> getContentProperties()
          Get request content properties
 String getHost()
           
static String getHost(SocketChannel socketChannel)
           
 String getLocalHost()
           
static String getLocalHost(SocketChannel socketChannel)
           
 int getLocalPort()
           
static int getLocalPort(SocketChannel socketChannel)
           
 int getMessageId()
          Get request/response messageId of 1st frame
 int getPort()
           
static int getPort(SocketChannel socketChannel)
           
 SocketChannel getSocketChannel()
           
 boolean isDirectMode()
           
 InputStream openInputStream()
           
 OutputStream openOutputStream()
           
 void prepareForReading()
           
 void setChannelId(int channelId)
          Set channel id
 void setContentId(int contentId)
          Set request/response contentId
 void setContentProperty(int key, String value)
          Set response content properties
 void setDirectMode(boolean isDirectMode)
           
 void setInputStreamByteBuffer(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(SocketChannel socketChannel)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Connection

public Connection(SocketChannel socketChannel)
Method Detail

getSocketChannel

public SocketChannel getSocketChannel()

setSocketChannel

public void setSocketChannel(SocketChannel socketChannel)

prepareForReading

public void prepareForReading()
                       throws IOException
Throws:
IOException

openInputStream

public InputStream openInputStream()
                            throws IOException
Throws:
IOException

openOutputStream

public OutputStream openOutputStream()
                              throws IOException
Throws:
IOException

flush

public void flush()
           throws IOException
Throws:
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 Map<Integer,String> getContentProperties()
Get request content properties


setContentProperty

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


setInputStreamByteBuffer

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


close

public void close()
           throws IOException
Throws:
IOException

create

public static Connection create(String host,
                                int port)
                         throws IOException
Throws:
IOException

finalize

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

getHost

public String getHost()

getPort

public int getPort()

getLocalHost

public String getLocalHost()

getLocalPort

public int getLocalPort()

toString

public String toString()
Overrides:
toString in class Object

getHost

public static String getHost(SocketChannel socketChannel)

getPort

public static int getPort(SocketChannel socketChannel)

getLocalHost

public static String getLocalHost(SocketChannel socketChannel)

getLocalPort

public static int getLocalPort(SocketChannel socketChannel)


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.