public class InvokerService extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
InvokerService.InvokerInfoBuffer
Info buffer.
|
class |
InvokerService.InvokerServerHttpHandler
Invoker server handler.
|
class |
InvokerService.InvokerServerHttpInitializer
Invoker server HTTP initializer.
|
static class |
InvokerService.NettyServerRef<T extends io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>>
Netty Server reference.
|
| Constructor and Description |
|---|
InvokerService()
the default one
|
InvokerService(int port,
Map<String,Object> targetMap) |
InvokerService(int port,
Object... targets) |
| Modifier and Type | Method and Description |
|---|---|
String |
getContextPrefix() |
com.google.gson.Gson |
getGson() |
URIInvoker |
getInvoker() |
InvokerService.NettyServerRef<InvokerService.InvokerServerHttpInitializer> |
getNettyServerRef() |
int |
getPort() |
static InvokerService |
instance()
Returns the singleton instance.
|
boolean |
isRunning() |
static void |
main(String[] args)
The starter for command line.
|
InvokerService.InvokerInfoBuffer |
processRequest(io.netty.handler.codec.http.FullHttpRequest request,
String[] uriSpec)
Process the given request and URI spec.
|
void |
setContextPrefix(String contextPrefix) |
void |
setPort(int port) |
void |
start()
Start
|
static void |
start(Object... targets)
Start the singleton instance with given targets.
|
void |
start(String contextPrefix)
Start with context.
|
void |
stop()
Stop.
|
public InvokerService()
public InvokerService(int port,
Object... targets)
port - the port to usetargets - the targetspublic InvokerService.InvokerInfoBuffer processRequest(io.netty.handler.codec.http.FullHttpRequest request, String[] uriSpec)
request - the http requesturiSpec - the URI specificationpublic void start()
public void start(String contextPrefix)
contextPrefix - the context prefixpublic void stop()
public int getPort()
public void setPort(int port)
port - the port to setpublic String getContextPrefix()
public void setContextPrefix(String contextPrefix)
contextPrefix - the contextPrefix to setpublic com.google.gson.Gson getGson()
public InvokerService.NettyServerRef<InvokerService.InvokerServerHttpInitializer> getNettyServerRef()
public URIInvoker getInvoker()
public boolean isRunning()
public static InvokerService instance()
public static void start(Object... targets)
targets - the targetspublic static void main(String[] args)
args - the argumentsCopyright © 2016. All rights reserved.