Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.enterprisedt.util.proxy
Class PlainSocket

    java.lang.Object
      java.net.Socket
          com.enterprisedt.util.proxy.PlainSocket

All Implemented Interfaces:
  StreamSocket

    public class PlainSocket

extends java.net.Socket
implements StreamSocket

Version:
  $Revision: 1.4 $
Author:
  $author$

Field Summary
`protected java.lang.String` | `remoteHostname`

Constructor Summary
`PlainSocket()` Creates a new PlainSocket object.
`PlainSocket(java.net.InetAddress addr, int port)` Creates a new PlainSocket object.
`PlainSocket(java.lang.String host, int port)` Creates a new PlainSocket object.

Method Summary
`static PlainSocket` | `createPlainSocket(java.net.InetAddress host, int port, int timeout)` Create a connected socket, using a timeout if it is available.
`static PlainSocket` | `createPlainSocket(java.lang.String host, int port, int timeout)` Create a connected socket, using a timeout if it is available.
`java.lang.String` | `getDetail()` Get details about the socket
`java.lang.String` | `getRemoteHost()` Get the actual hostname
`boolean` | `isSecureMode()` Is this socket in secure mode?
`void` | `setRemoteHost(java.lang.String remoteHost)` Set the remote hostname

Methods inherited from class java.net.Socket
`bind, close, connect, connect, getChannel, getInetAddress, getInputStream, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getOutputStream, 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`

Methods inherited from interface com.enterprisedt.util.proxy.StreamSocket
`close, getInetAddress, getInputStream, getLocalAddress, getLocalPort, getOutputStream, getReceiveBufferSize, getSendBufferSize, getSoTimeout, isConnected, setReceiveBufferSize, setSendBufferSize, setSoTimeout`

Field Detail

### remoteHostname

    protected java.lang.String remoteHostname

Constructor Detail

### PlainSocket

    public PlainSocket()

  Creates a new PlainSocket object.

  Throws:
    `java.io.IOException`

### PlainSocket

    public PlainSocket(java.lang.String host,
                       int port)
                throws java.io.IOException

  Creates a new PlainSocket object.

  Parameters:
    `host` -
    `port` -
  Throws:
    `java.io.IOException`

### PlainSocket

    public PlainSocket(java.net.InetAddress addr,
                       int port)
                throws java.io.IOException

  Creates a new PlainSocket object.

  Parameters:
    `addr` -
    `port` -
  Throws:
    `java.io.IOException`

Method Detail

### isSecureMode

    public boolean isSecureMode()

  Is this socket in secure mode?

  Specified by:
    `isSecureMode` in interface `StreamSocket`
  Returns:
    true if secure mode

### getRemoteHost

    public java.lang.String getRemoteHost()

  Get the actual hostname

  Specified by:
    `getRemoteHost` in interface `StreamSocket`
  Returns:
    remote hostname

### setRemoteHost

    public void setRemoteHost(java.lang.String remoteHost)

  Set the remote hostname

  Specified by:
    `setRemoteHost` in interface `StreamSocket`
  Parameters:
    `remoteHost` - remote hostname

### getDetail

    public java.lang.String getDetail()

  Description copied from interface: `StreamSocket`
  Get details about the socket

  Specified by:
    `getDetail` in interface `StreamSocket`
  Returns:

### createPlainSocket

    public static PlainSocket createPlainSocket(java.lang.String host,
                                                int port,
                                                int timeout)
                                         throws java.io.IOException

  Create a connected socket, using a timeout if it is available. Availability is tested by trying to create instances of the required classes and methods (JRE 1.4+)

  Parameters:
    `host` - remote host to connect to
    `port` - port on remote host
    `timeout` - timeout in milliseconds on
  Throws:
    `java.io.IOException`

### createPlainSocket

    public static PlainSocket createPlainSocket(java.net.InetAddress host,
                                                int port,
                                                int timeout)
                                         throws java.io.IOException

  Create a connected socket, using a timeout if it is available. Availability is tested by trying to create instances of the required classes and methods (JRE 1.4+)

  Parameters:
    `host` - remote host to connect to
    `port` - port on remote host
    `timeout` - timeout in milliseconds on
  Throws:
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2001-2007 Enterprise Distributed Technologies Ltd. All Rights Reserved.