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.bridge.http
Class SocketContextServer

    java.lang.Object
      php.java.bridge.http.PipeContextServer
          php.java.bridge.http.SocketContextServer

All Implemented Interfaces:
  java.lang.Runnable, IContextServer

    public class SocketContextServer

extends PipeContextServer
implements java.lang.Runnable

This class manages the ContextRunners. It pulls a ContextRunner from the list of available runners and invokes it. We currently check only if the number of runners requested is less than or equal to the number of runners created by the servlet requests.

Nested Class Summary

Nested classes/interfaces inherited from interface php.java.bridge.http.IContextServer
`IContextServer.ChannelName`

Constructor Summary
`SocketContextServer(ContextServer contextServer, ThreadPool threadPool)` Create a new ContextServer using the ThreadPool.

Method Summary
`void` | `destroy()` Destroy the server
`java.lang.String` | `getChannelName()` Returns the server port.
`boolean` | `isAvailable()` Check if the ContextServer is ready, i.e.
`void` | `run()`
`boolean` | `start(ContextRunner runner)`

Methods inherited from class php.java.bridge.http.PipeContextServer
`schedule, start`

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

Constructor Detail

### SocketContextServer

    public SocketContextServer(ContextServer contextServer,
                               ThreadPool threadPool)

  Create a new ContextServer using the ThreadPool.

  Parameters:
    `threadPool` - Obtain runnables from this pool. If null, new threads will be created.

Method Detail

### run

    public void run()

  Specified by:
    `run` in interface `java.lang.Runnable`

### destroy

    public void destroy()

  Destroy the server

  Specified by:
    `destroy` in interface `IContextServer`
  Overrides:
    `destroy` in class `PipeContextServer`

### isAvailable

    public boolean isAvailable()

  Check if the ContextServer is ready, i.e. it has created a server socket.

  Specified by:
    `isAvailable` in interface `IContextServer`
  Overrides:
    `isAvailable` in class `PipeContextServer`
  Returns:
    true if there's a server socket listening, false otherwise.

### getChannelName

    public java.lang.String getChannelName()

  Returns the server port.

  Returns:
    The server port.

### start

    public boolean start(ContextRunner runner)

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