org.apache.solr.cloud

## Class SocketProxy

- java.lang.Object
- - org.apache.solr.cloud.SocketProxy

-     public class SocketProxy
      extends Object

  Kindly borrowed the idea and base implementation from the ActiveMQ project; useful for blocking traffic on a specified port.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `SocketProxy.Acceptor`
    `class` | `SocketProxy.Bridge`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ACCEPT_TIMEOUT_MILLIS`
    `List<SocketProxy.Bridge>` | `connections`
    `static int` | `PUMP_SOCKET_TIMEOUT_MS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SocketProxy()`
    `SocketProxy(boolean useSSL)`
    `SocketProxy(int port, boolean useSSL)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `int` | `getAcceptBacklog()`
    `int` | `getListenPort()`
    `URI` | `getUrl()`
    `void` | `goOn()`
    `void` | `halfClose()`
    `boolean` | `isPauseAtStart()`
    `void` | `open(URI uri)`
    `void` | `pause()`
    `void` | `reopen()`
    `void` | `setAcceptBacklog(int acceptBacklog)`
    `void` | `setPauseAtStart(boolean pauseAtStart)`
    `void` | `setReceiveBufferSize(int receiveBufferSize)`
    `void` | `setTarget(URI tcpBrokerUri)`
    `String` | `toString()`
    `boolean` | `waitUntilClosed(long timeoutSeconds)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### ACCEPT_TIMEOUT_MILLIS

          public static final int ACCEPT_TIMEOUT_MILLIS

      See Also:
        Constant Field Values

    - #### PUMP_SOCKET_TIMEOUT_MS

          public static final int PUMP_SOCKET_TIMEOUT_MS

      See Also:
        Constant Field Values

    - #### connections

          public List<SocketProxy.Bridge> connections

  - ### Constructor Detail

    - #### SocketProxy

          public SocketProxy()
                      throws Exception

      Throws:
        `Exception`

    - #### SocketProxy

          public SocketProxy(boolean useSSL)
                      throws Exception

      Throws:
        `Exception`

    - #### SocketProxy

          public SocketProxy(int port,
                             boolean useSSL)
                      throws Exception

      Throws:
        `Exception`

  - ### Method Detail

    - #### open

          public void open(URI uri)
                    throws Exception

      Throws:
        `Exception`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### setReceiveBufferSize

          public void setReceiveBufferSize(int receiveBufferSize)

    - #### setTarget

          public void setTarget(URI tcpBrokerUri)

    - #### getListenPort

          public int getListenPort()

    - #### getUrl

          public URI getUrl()

    - #### close

          public void close()

    - #### halfClose

          public void halfClose()

    - #### waitUntilClosed

          public boolean waitUntilClosed(long timeoutSeconds)
                                  throws InterruptedException

      Throws:
        `InterruptedException`

    - #### reopen

          public void reopen()

    - #### pause

          public void pause()

    - #### goOn

          public void goOn()

    - #### isPauseAtStart

          public boolean isPauseAtStart()

    - #### setPauseAtStart

          public void setPauseAtStart(boolean pauseAtStart)

    - #### getAcceptBacklog

          public int getAcceptBacklog()

    - #### setAcceptBacklog

          public void setAcceptBacklog(int acceptBacklog)

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.