## org.eclipse.jetty.io.bio
Class SocketEndPoint

    java.lang.Object
      org.eclipse.jetty.io.bio.StreamEndPoint
          org.eclipse.jetty.io.bio.SocketEndPoint

All Implemented Interfaces:
  EndPoint

Direct Known Subclasses:
  SocketConnector.ConnectorEndPoint

    public class SocketEndPoint

extends StreamEndPoint

To change the template for this generated type comment go to Window - Preferences - Java - Code Generation - Code and Comments

Constructor Summary
`` `SocketEndPoint(Socket socket)`
`protected` `SocketEndPoint(Socket socket, int maxIdleTime)`

Method Summary
`void` `close()` Close any backing stream associated with the endpoint
`String` `getLocalAddr()`
`String` `getLocalHost()`
`int` `getLocalPort()`
`String` `getRemoteAddr()`
`String` `getRemoteHost()`
`int` `getRemotePort()`
`Object` `getTransport()`
`boolean` `isOpen()`
`void` `setMaxIdleTime(int timeMs)` Set the max idle time.
`void` `shutdownOutput()` Shutdown any backing output stream associated with the endpoint

Methods inherited from class org.eclipse.jetty.io.bio.StreamEndPoint
`blockReadable, blockWritable, fill, flush, flush, flush, getInputStream, getMaxIdleTime, getOutputStream, isBlocking, isBufferingInput, isBufferingOutput, isBufferred, isClosed, setInputStream, setOutputStream`

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

Constructor Detail

### SocketEndPoint

    public SocketEndPoint(Socket socket)
                   throws IOException

Throws:
  `IOException`

### SocketEndPoint

    protected SocketEndPoint(Socket socket,
                             int maxIdleTime)
                      throws IOException

Throws:
  `IOException`

Method Detail

### isOpen

    public boolean isOpen()

  Specified by:
    `isOpen` in interface `EndPoint`
  Overrides:
    `isOpen` in class `StreamEndPoint`

### shutdownOutput

    public void shutdownOutput()
                        throws IOException

  Description copied from interface: `EndPoint`
  Shutdown any backing output stream associated with the endpoint

  Specified by:
    `shutdownOutput` in interface `EndPoint`
  Overrides:
    `shutdownOutput` in class `StreamEndPoint`
  Throws:
    `IOException`

### close

    public void close()
               throws IOException

  Description copied from interface: `EndPoint`
  Close any backing stream associated with the endpoint

  Specified by:
    `close` in interface `EndPoint`
  Overrides:
    `close` in class `StreamEndPoint`
  Throws:
    `IOException`

### getLocalAddr

    public String getLocalAddr()

  Specified by:
    `getLocalAddr` in interface `EndPoint`
  Overrides:
    `getLocalAddr` in class `StreamEndPoint`
  Returns:
    The local IP address to which this `EndPoint` is bound, or `null` if this `EndPoint` does not represent a network connection.

### getLocalHost

    public String getLocalHost()

  Specified by:
    `getLocalHost` in interface `EndPoint`
  Overrides:
    `getLocalHost` in class `StreamEndPoint`
  Returns:
    The local host name to which this `EndPoint` is bound, or `null` if this `EndPoint` does not represent a network connection.

### getLocalPort

    public int getLocalPort()

  Specified by:
    `getLocalPort` in interface `EndPoint`
  Overrides:
    `getLocalPort` in class `StreamEndPoint`
  Returns:
    The local port number on which this `EndPoint` is listening, or `0` if this `EndPoint` does not represent a network connection.

### getRemoteAddr

    public String getRemoteAddr()

  Specified by:
    `getRemoteAddr` in interface `EndPoint`
  Overrides:
    `getRemoteAddr` in class `StreamEndPoint`
  Returns:
    The remote IP address to which this `EndPoint` is connected, or `null` if this `EndPoint` does not represent a network connection.

### getRemoteHost

    public String getRemoteHost()

  Specified by:
    `getRemoteHost` in interface `EndPoint`
  Overrides:
    `getRemoteHost` in class `StreamEndPoint`
  Returns:
    The host name of the remote machine to which this `EndPoint` is connected, or `null` if this `EndPoint` does not represent a network connection.

### getRemotePort

    public int getRemotePort()

  Specified by:
    `getRemotePort` in interface `EndPoint`
  Overrides:
    `getRemotePort` in class `StreamEndPoint`
  Returns:
    The remote port number to which this `EndPoint` is connected, or `0` if this `EndPoint` does not represent a network connection.

### getTransport

    public Object getTransport()

  Specified by:
    `getTransport` in interface `EndPoint`
  Overrides:
    `getTransport` in class `StreamEndPoint`
  Returns:
    The underlying transport object (socket, channel, etc.)

### setMaxIdleTime

    public void setMaxIdleTime(int timeMs)
                        throws IOException

  Description copied from interface: `EndPoint`
  Set the max idle time.

  Specified by:
    `setMaxIdleTime` in interface `EndPoint`
  Overrides:
    `setMaxIdleTime` in class `StreamEndPoint`
  Parameters:
    `timeMs` - the max idle time in MS.
  Throws:
    `IOException` - if the timeout cannot be set.
  See Also:
    `StreamEndPoint.setMaxIdleTime(int)`

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.