com.faunos.util.net.http
Class DebugHttpServer

java.lang.Object
  extended by com.faunos.util.net.HandletServer
      extended by com.faunos.util.net.http.HttpServer
          extended by com.faunos.util.net.http.DebugHttpServer

public class DebugHttpServer
extends HttpServer

A version of HttpServer used for debugging. This version simply echoes what is read or written to std out.

Author:
Babak Farhang

Field Summary
 
Fields inherited from class com.faunos.util.net.http.HttpServer
app
 
Fields inherited from class com.faunos.util.net.HandletServer
logger
 
Constructor Summary
DebugHttpServer(ResponseFactory app, InetAddress host, int port, ExecutorService exec)
          Invokes the super class's constructor.
DebugHttpServer(ResponseFactory app, InetAddress host, int port, ExecutorService exec, Logger logger)
          Invokes the super class's constructor.
 
Method Summary
protected  ScatteringByteChannel inputChannel(SocketChannel socket)
          Wraps and returns the given socket with a DebugInputChannel.
protected  GatheringByteChannel outputChannel(SocketChannel socket)
          Wraps and returns the given socket with a DebugOutputChannel.
 
Methods inherited from class com.faunos.util.net.http.HttpServer
newHandlet
 
Methods inherited from class com.faunos.util.net.HandletServer
isAlive, setProcessingHintThreshold, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugHttpServer

public DebugHttpServer(ResponseFactory app,
                       InetAddress host,
                       int port,
                       ExecutorService exec)
                throws IOException
Invokes the super class's constructor.

Throws:
IOException

DebugHttpServer

public DebugHttpServer(ResponseFactory app,
                       InetAddress host,
                       int port,
                       ExecutorService exec,
                       Logger logger)
                throws IOException
Invokes the super class's constructor.

Throws:
IOException
Method Detail

inputChannel

protected ScatteringByteChannel inputChannel(SocketChannel socket)
Wraps and returns the given socket with a DebugInputChannel.

Overrides:
inputChannel in class HandletServer

outputChannel

protected GatheringByteChannel outputChannel(SocketChannel socket)
Wraps and returns the given socket with a DebugOutputChannel.

Overrides:
outputChannel in class HandletServer


SourceForge.net Logo