Overview | Package | Class | Tree | Deprecated | Index | Help
| Sun Adapter for TCP/IP API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.stc.connector.tcpip.model.factory
Class TCPIPSocketFactoryImpl.TCPIPSocket

    java.lang.Object
      java.net.Socket
          com.stc.connector.tcpip.model.factory.TCPIPSocketFactoryImpl.TCPIPSocket

Enclosing class:
  TCPIPSocketFactoryImpl

    public class TCPIPSocketFactoryImpl.TCPIPSocket

extends java.net.Socket

It is observed that socket.getOutputStream() inside glassfish application server returns a different OutputStream everytime it is invoked. This class is written just to override getOutputStream() to return the same instance of OutputStream everytime it is invoked on this socket.

Author:
  Vishnuvardhan P.R

Constructor Summary
`TCPIPSocketFactoryImpl.TCPIPSocket()` Constructor
`TCPIPSocketFactoryImpl.TCPIPSocket(java.net.InetAddress address, int port)` Constructor
`TCPIPSocketFactoryImpl.TCPIPSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddr, int localPort)` Constructor
`TCPIPSocketFactoryImpl.TCPIPSocket(java.lang.String host, int port)` Constructor
`TCPIPSocketFactoryImpl.TCPIPSocket(java.lang.String host, int port, java.net.InetAddress localAddr, int localPort)` Constructor

Method Summary
`java.io.OutputStream` | `getOutputStream()` This method is overridden to ensure that the same outputStream is returned everytime it is invoked on this socket

Methods inherited from class java.net.Socket
`bind, close, connect, connect, getChannel, getInetAddress, getInputStream, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, shutdownInput, shutdownOutput, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### TCPIPSocketFactoryImpl.TCPIPSocket

    public TCPIPSocketFactoryImpl.TCPIPSocket()

  Constructor

### TCPIPSocketFactoryImpl.TCPIPSocket

    public TCPIPSocketFactoryImpl.TCPIPSocket(java.lang.String host,
                                              int port)
                                       throws java.net.UnknownHostException,
                                              java.io.IOException

  Constructor

  Parameters:
    `host` - remote host to connect
    `port` - remote port number to connect
  Throws:
    `java.net.UnknownHostException`
    `java.io.IOException`

### TCPIPSocketFactoryImpl.TCPIPSocket

    public TCPIPSocketFactoryImpl.TCPIPSocket(java.net.InetAddress address,
                                              int port)
                                       throws java.io.IOException

  Constructor

  Parameters:
    `address` - remote address to connect
    `port` - remote port number to connect
  Throws:
    `java.io.IOException`

### TCPIPSocketFactoryImpl.TCPIPSocket

    public TCPIPSocketFactoryImpl.TCPIPSocket(java.lang.String host,
                                              int port,
                                              java.net.InetAddress localAddr,
                                              int localPort)
                                       throws java.io.IOException

  Constructor

  Parameters:
    `host` - remote host to connect
    `port` - remote port number to connect
    `localAddr` - local address the socket is bound to
    `localPort` - local port the socket is bound to
  Throws:
    `java.io.IOException`

### TCPIPSocketFactoryImpl.TCPIPSocket

    public TCPIPSocketFactoryImpl.TCPIPSocket(java.net.InetAddress address,
                                              int port,
                                              java.net.InetAddress localAddr,
                                              int localPort)
                                       throws java.io.IOException

  Constructor

  Parameters:
    `address` - remote address to connect
    `port` - remote port to connect
    `localAddr` - local InetAddress this socket is bound to
    `localPort` - local port this socket is bound to
  Throws:
    `java.io.IOException`

Method Detail

### getOutputStream

    public java.io.OutputStream getOutputStream()
                                         throws java.io.IOException

  This method is overridden to ensure that the same outputStream is returned everytime it is invoked on this socket

  Overrides:
    `getOutputStream` in class `java.net.Socket`
  Returns:
    OutputStream of this socket
  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Sun Adapter for TCP/IP API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD