Package com.sun.xml.ws.transport.tcp.io
Class Connection
- java.lang.Object
-
- com.sun.xml.ws.transport.tcp.io.Connection
-
public final class Connection extends Object
- Author:
- Alexey Stashok
-
-
Constructor Summary
Constructors Constructor Description Connection(SocketChannel socketChannel)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()static Connectioncreate(String host, int port)protected voidfinalize()voidflush()intgetChannelId()Get channel idintgetContentId()Get request/response contentIdMap<Integer,String>getContentProperties()Get request content propertiesStringgetHost()static StringgetHost(SocketChannel socketChannel)StringgetLocalHost()static StringgetLocalHost(SocketChannel socketChannel)intgetLocalPort()static intgetLocalPort(SocketChannel socketChannel)intgetMessageId()Get request/response messageId of 1st frameintgetPort()static intgetPort(SocketChannel socketChannel)SocketChannelgetSocketChannel()booleanisDirectMode()InputStreamopenInputStream()OutputStreamopenOutputStream()voidprepareForReading()voidsetChannelId(int channelId)Set channel idvoidsetContentId(int contentId)Set request/response contentIdvoidsetContentProperty(int key, String value)Set response content propertiesvoidsetDirectMode(boolean isDirectMode)voidsetInputStreamByteBuffer(ByteBuffer messageBuffer)Set messageBuffer for InputStream some message part could be preread beforevoidsetMessageId(int messageId)Set request/response messageId of 1st framevoidsetSocketChannel(SocketChannel socketChannel)StringtoString()
-
-
-
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
-
getHost
public String getHost()
-
getPort
public int getPort()
-
getLocalHost
public String getLocalHost()
-
getLocalPort
public int getLocalPort()
-
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)
-
-