public class Main extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Main.HandlerFactory
Factory that instantiates Jetty Handlers
|
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args) |
static HttpServer |
start(String[] args)
Creates and starts an
HttpServer using JSON POJO serialization of requests/responses. |
static HttpServer |
start(String[] args,
int port,
Main.HandlerFactory handlerFactory)
Creates and starts an
HttpServer using the given factory to create the Handler. |
public static void main(String[] args) throws InterruptedException, ClassNotFoundException, IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException
public static HttpServer start(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException
HttpServer
using JSON POJO serialization of requests/responses.
Arguments are as follows:
Meta.Factory
class
name
Meta.Factory.create(java.util.List)
args
- Command-line argumentsClassNotFoundException
InstantiationException
IllegalAccessException
NoSuchMethodException
InvocationTargetException
public static HttpServer start(String[] args, int port, Main.HandlerFactory handlerFactory) throws ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException
HttpServer
using the given factory to create the Handler.
Arguments are as follows:
Meta.Factory
class
name
Meta.Factory.create(java.util.List)
args
- Command-line argumentsport
- Server port to bindhandlerFactory
- Factory to create the handler used by the serverClassNotFoundException
InstantiationException
IllegalAccessException
NoSuchMethodException
InvocationTargetException
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.