org.apache.avro.ipc
Class HttpServer

java.lang.Object
  extended by org.apache.avro.ipc.HttpServer
All Implemented Interfaces:
Server

public class HttpServer
extends Object
implements Server

An HTTP-based RPC Server.


Constructor Summary
HttpServer(Responder responder, int port)
          Constructs a server to run on the named port.
HttpServer(ResponderServlet servlet, int port)
          Constructs a server to run on the named port.
 
Method Summary
 void close()
          Stop this server.
 int getPort()
          The port this server runs on.
 void join()
          Wait for this server to exit.
 void start()
          Start the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpServer

public HttpServer(Responder responder,
                  int port)
           throws IOException
Constructs a server to run on the named port.

Throws:
IOException

HttpServer

public HttpServer(ResponderServlet servlet,
                  int port)
           throws IOException
Constructs a server to run on the named port.

Throws:
IOException
Method Detail

getPort

public int getPort()
Description copied from interface: Server
The port this server runs on.

Specified by:
getPort in interface Server

close

public void close()
Description copied from interface: Server
Stop this server.

Specified by:
close in interface Server

start

public void start()
Start the server.

Specified by:
start in interface Server
Throws:
AvroRuntimeException - if the underlying Jetty server throws any exception while starting.

join

public void join()
          throws InterruptedException
Description copied from interface: Server
Wait for this server to exit.

Specified by:
join in interface Server
Throws:
InterruptedException


Copyright © 2010 The Apache Software Foundation