public class GrizzlyProxy extends Object implements NetworkProxy
| Modifier and Type | Field and Description |
|---|---|
static String |
AUTO_CONFIGURE |
protected GrizzlyListener |
grizzlyListener |
static String |
LEADER_FOLLOWER |
| Constructor and Description |
|---|
GrizzlyProxy(GrizzlyService service,
NetworkListener listener) |
| Modifier and Type | Method and Description |
|---|---|
protected GrizzlyListener |
createGlassfishListener(NetworkListener networkListener) |
protected GrizzlyListener |
createGrizzlyListener(NetworkListener networkListener) |
protected GrizzlyListener |
createServiceInitializerListener(NetworkListener networkListener) |
void |
destroy()
Destroy the proxy.
|
InetAddress |
getAddress() |
int |
getPort() |
GrizzlyListener |
getUnderlyingListener() |
void |
initialize()
Create a
GrizzlyServiceListener based on a NetworkListener
configuration object. |
void |
registerEndpoint(Endpoint endpoint)
Registers a new endpoint (proxy implementation) defined by the passed
Endpoint object. |
void |
registerEndpoint(String contextRoot,
Collection<String> vsServers,
org.glassfish.grizzly.http.server.HttpHandler endpointService,
ApplicationContainer container)
Registers a new endpoint (proxy implementation) for a particular
context-root.
|
Future<Result<Thread>> |
start()
Start the proxy.
|
protected void |
start0()
Start internal Grizzly listener.
|
void |
stop()
Stops the Grizzly service.
|
String |
toString() |
void |
unregisterEndpoint(Endpoint endpoint)
Removes the
Endpoint from our list of endpoints. |
void |
unregisterEndpoint(String contextRoot,
ApplicationContainer app)
Removes the context-root from our list of endpoints.
|
protected GrizzlyListener grizzlyListener
public static final String LEADER_FOLLOWER
public static final String AUTO_CONFIGURE
public GrizzlyProxy(GrizzlyService service, NetworkListener listener)
public void initialize()
throws IOException
GrizzlyServiceListener based on a NetworkListener
configuration object.IOExceptionprotected GrizzlyListener createGrizzlyListener(NetworkListener networkListener)
protected GrizzlyListener createGlassfishListener(NetworkListener networkListener)
protected GrizzlyListener createServiceInitializerListener(NetworkListener networkListener)
public void stop()
throws IOException
stop in interface NetworkProxyIOExceptionpublic void destroy()
NetworkProxydestroy in interface NetworkProxypublic void registerEndpoint(String contextRoot, Collection<String> vsServers, org.glassfish.grizzly.http.server.HttpHandler endpointService, ApplicationContainer container) throws EndpointRegistrationException
EndpointMapperregisterEndpoint in interface EndpointMapper<org.glassfish.grizzly.http.server.HttpHandler>contextRoot - for the proxyEndpointRegistrationExceptionpublic void unregisterEndpoint(String contextRoot, ApplicationContainer app) throws EndpointRegistrationException
unregisterEndpoint in interface EndpointMapper<org.glassfish.grizzly.http.server.HttpHandler>EndpointRegistrationExceptionpublic void registerEndpoint(Endpoint endpoint)
Endpoint object.registerEndpoint in interface EndpointMapper<org.glassfish.grizzly.http.server.HttpHandler>endpoint - Endpointpublic void unregisterEndpoint(Endpoint endpoint) throws EndpointRegistrationException
Endpoint from our list of endpoints.unregisterEndpoint in interface EndpointMapper<org.glassfish.grizzly.http.server.HttpHandler>endpoint - EndpointEndpointRegistrationExceptionpublic Future<Result<Thread>> start() throws IOException
NetworkProxystart in interface NetworkProxyIOExceptionprotected void start0()
throws IOException
IOExceptionpublic int getPort()
getPort in interface NetworkProxyNetworkProxy is
listening onpublic InetAddress getAddress()
getAddress in interface NetworkProxyInetAddress of this NetworkProxypublic GrizzlyListener getUnderlyingListener()
Copyright © 2017. All rights reserved.