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.IOException
protected GrizzlyListener createGrizzlyListener(NetworkListener networkListener)
protected GrizzlyListener createGlassfishListener(NetworkListener networkListener)
protected GrizzlyListener createServiceInitializerListener(NetworkListener networkListener)
public void stop() throws IOException
stop
in interface NetworkProxy
IOException
public void destroy()
NetworkProxy
destroy
in interface NetworkProxy
public void registerEndpoint(String contextRoot, Collection<String> vsServers, org.glassfish.grizzly.http.server.HttpHandler endpointService, ApplicationContainer container) throws EndpointRegistrationException
EndpointMapper
registerEndpoint
in interface EndpointMapper<org.glassfish.grizzly.http.server.HttpHandler>
contextRoot
- for the proxyEndpointRegistrationException
public void unregisterEndpoint(String contextRoot, ApplicationContainer app) throws EndpointRegistrationException
unregisterEndpoint
in interface EndpointMapper<org.glassfish.grizzly.http.server.HttpHandler>
EndpointRegistrationException
public void registerEndpoint(Endpoint endpoint)
Endpoint
object.registerEndpoint
in interface EndpointMapper<org.glassfish.grizzly.http.server.HttpHandler>
endpoint
- Endpoint
public void unregisterEndpoint(Endpoint endpoint) throws EndpointRegistrationException
Endpoint
from our list of endpoints.unregisterEndpoint
in interface EndpointMapper<org.glassfish.grizzly.http.server.HttpHandler>
endpoint
- Endpoint
EndpointRegistrationException
public Future<Result<Thread>> start() throws IOException
NetworkProxy
start
in interface NetworkProxy
IOException
protected void start0() throws IOException
IOException
public int getPort()
getPort
in interface NetworkProxy
NetworkProxy
is
listening onpublic InetAddress getAddress()
getAddress
in interface NetworkProxy
InetAddress
of this NetworkProxy
public GrizzlyListener getUnderlyingListener()
Copyright © 2020. All rights reserved.