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

## php.java.servlet
Class ConnectionPool.Factory

    java.lang.Object
      php.java.servlet.ConnectionPool.Factory

Enclosing class:
  ConnectionPool

    public static class ConnectionPool.Factory

extends java.lang.Object

In-/OutputStream factory. Override this class if you want to use your own streams.

Author:
  jostb

Constructor Summary
`ConnectionPool.Factory()`

Method Summary
`java.net.Socket` | `connect(java.lang.String host, int port)` Create a new socket and connect it to the given host/port
`java.io.InputStream` | `createInputStream()` Create a new InputStream.
`java.io.OutputStream` | `createOutputStream()` Create a new OutputStream.

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

Constructor Detail

### ConnectionPool.Factory

    public ConnectionPool.Factory()

Method Detail

### connect

    public java.net.Socket connect(java.lang.String host,
                                   int port)
                            throws ConnectionPool.ConnectException,
                                   java.net.SocketException

  Create a new socket and connect it to the given host/port

  Parameters:
    `host` - The host, for example 127.0.0.1
    `port` - The port, for example 9667
  Returns:
    The socket
  Throws:
    `UnknownHostException`
    `ConnectionPool.ConnectionException`
    `ConnectionPool.ConnectException`
    `java.net.SocketException`

### createInputStream

    public java.io.InputStream createInputStream()
                                          throws ConnectionPool.ConnectionException

  Create a new InputStream.

  Returns:
    The input stream.
  Throws:
    `ConnectionPool.ConnectionException`

### createOutputStream

    public java.io.OutputStream createOutputStream()
                                            throws ConnectionPool.ConnectionException

  Create a new OutputStream.

  Returns:
    The output stream.
  Throws:
    `ConnectionPool.ConnectionException`

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