public abstract class AbstractHttpServer extends Object implements HttpServer
| Constructor and Description |
|---|
AbstractHttpServer(URL url,
HttpHandler handler) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandleIdle()
Following methods are extended from RemotingServer, useless for http servers
|
void |
close()
close the channel.
|
void |
close(int timeout)
Graceful close the channel.
|
Channel |
getChannel(InetSocketAddress remoteAddress)
get channel.
|
ChannelHandler |
getChannelHandler()
get channel handler.
|
Collection<Channel> |
getChannels()
get channels.
|
HttpHandler |
getHttpHandler()
get http handler.
|
InetSocketAddress |
getLocalAddress()
get local address.
|
URL |
getUrl()
get url.
|
boolean |
isBound()
is bound.
|
boolean |
isClosed()
is closed.
|
void |
reset(Parameters parameters) |
void |
reset(URL url)
reset.
|
void |
send(Object message)
send message.
|
void |
send(Object message,
boolean sent)
send message.
|
void |
startClose() |
public AbstractHttpServer(URL url, HttpHandler handler)
public HttpHandler getHttpHandler()
HttpServergetHttpHandler in interface HttpServerpublic URL getUrl()
HttpServergetUrl in interface EndpointgetUrl in interface HttpServerpublic boolean isBound()
HttpServerisBound in interface HttpServerisBound in interface RemotingServerpublic InetSocketAddress getLocalAddress()
HttpServergetLocalAddress in interface EndpointgetLocalAddress in interface HttpServerpublic void close()
HttpServerclose in interface Endpointclose in interface HttpServerpublic void close(int timeout)
HttpServerclose in interface Endpointclose in interface HttpServerpublic boolean isClosed()
HttpServerisClosed in interface EndpointisClosed in interface HttpServerpublic boolean canHandleIdle()
canHandleIdle in interface IdleSensiblepublic Collection<Channel> getChannels()
RemotingServergetChannels in interface RemotingServerpublic Channel getChannel(InetSocketAddress remoteAddress)
RemotingServergetChannel in interface RemotingServerpublic void reset(Parameters parameters)
reset in interface RemotingServerpublic ChannelHandler getChannelHandler()
EndpointgetChannelHandler in interface Endpointpublic void send(Object message) throws RemotingException
Endpointsend in interface EndpointRemotingExceptionpublic void send(Object message, boolean sent) throws RemotingException
Endpointsend in interface Endpointsent - already sent to socket?RemotingExceptionpublic void startClose()
startClose in interface EndpointCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.