public class GrizzlyServerManager extends Object implements HttpServerManager
| Modifier and Type | Class and Description |
|---|---|
protected class |
GrizzlyServerManager.ManagedGrizzlyHttpServer
Wrapper that adds startup and disposal of manager specific data.
|
| Modifier and Type | Field and Description |
|---|---|
protected WorkManagerSourceExecutorProvider |
executorProvider |
protected HttpListenerRegistry |
httpListenerRegistry |
static String |
MAXIMUM_HEADER_SECTION_SIZE_PROPERTY_KEY |
protected GrizzlyAddressDelegateFilter<org.glassfish.grizzly.ssl.SSLFilter> |
sslFilterDelegate |
protected org.glassfish.grizzly.nio.transport.TCPNIOTransport |
transport |
protected GrizzlyAddressDelegateFilter<org.glassfish.grizzly.websockets.WebSocketFilter> |
webSocketFilter |
| Constructor and Description |
|---|
GrizzlyServerManager(ExecutorService selectorPool,
ExecutorService workerPool,
ExecutorService idleTimeoutExecutorService,
HttpListenerRegistry httpListenerRegistry,
org.mule.runtime.http.api.tcp.TcpServerSocketProperties serverSocketProperties,
int selectorCount) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsServerFor(org.mule.runtime.http.api.server.ServerAddress serverAddress,
ServerIdentifier identifier) |
protected WorkManagerSourceExecutorProvider |
createExecutorProvider() |
protected GrizzlyServerManager.ManagedGrizzlyHttpServer |
createManagedServer(Supplier<org.mule.runtime.api.scheduler.Scheduler> schedulerSupplier,
org.mule.runtime.http.api.server.ServerAddress serverAddress,
ServerIdentifier identifier,
Supplier<Long> shutdownTimeout) |
org.mule.runtime.http.api.server.HttpServer |
createServerFor(org.mule.runtime.http.api.server.ServerAddress serverAddress,
Supplier<org.mule.runtime.api.scheduler.Scheduler> schedulerSupplier,
boolean usePersistentConnections,
int connectionIdleTimeout,
ServerIdentifier identifier,
Supplier<Long> shutdownTimeout) |
org.mule.runtime.http.api.server.HttpServer |
createSslServerFor(org.mule.runtime.api.tls.TlsContextFactory tlsContextFactory,
Supplier<org.mule.runtime.api.scheduler.Scheduler> schedulerSupplier,
org.mule.runtime.http.api.server.ServerAddress serverAddress,
boolean usePersistentConnections,
int connectionIdleTimeout,
ServerIdentifier identifier,
Supplier<Long> shutdownTimeout) |
void |
dispose()
Frees all the resource hold by the server manager.
|
org.mule.runtime.http.api.server.HttpServer |
lookupServer(ServerIdentifier identifier) |
public static final String MAXIMUM_HEADER_SECTION_SIZE_PROPERTY_KEY
protected final GrizzlyAddressDelegateFilter<org.glassfish.grizzly.ssl.SSLFilter> sslFilterDelegate
protected final GrizzlyAddressDelegateFilter<org.glassfish.grizzly.websockets.WebSocketFilter> webSocketFilter
protected final org.glassfish.grizzly.nio.transport.TCPNIOTransport transport
protected final HttpListenerRegistry httpListenerRegistry
protected final WorkManagerSourceExecutorProvider executorProvider
public GrizzlyServerManager(ExecutorService selectorPool, ExecutorService workerPool, ExecutorService idleTimeoutExecutorService, HttpListenerRegistry httpListenerRegistry, org.mule.runtime.http.api.tcp.TcpServerSocketProperties serverSocketProperties, int selectorCount)
protected WorkManagerSourceExecutorProvider createExecutorProvider()
public boolean containsServerFor(org.mule.runtime.http.api.server.ServerAddress serverAddress,
ServerIdentifier identifier)
containsServerFor in interface HttpServerManagerserverAddress - address of the serveridentifier - the id of the serverpublic org.mule.runtime.http.api.server.HttpServer createSslServerFor(org.mule.runtime.api.tls.TlsContextFactory tlsContextFactory,
Supplier<org.mule.runtime.api.scheduler.Scheduler> schedulerSupplier,
org.mule.runtime.http.api.server.ServerAddress serverAddress,
boolean usePersistentConnections,
int connectionIdleTimeout,
ServerIdentifier identifier,
Supplier<Long> shutdownTimeout)
throws org.mule.runtime.http.api.server.ServerCreationException
createSslServerFor in interface HttpServerManagerschedulerSupplier - work manager source to use for retrieving an Executor for processing this server requestsserverAddress - address of the serverusePersistentConnections - if true, the connections will be kept open for subsequent requestsconnectionIdleTimeout - the amount of milliseconds to keep open an idle connectionidentifier - the id of the servershutdownTimeout - time to wait for persistent connections to be closed when server is stopped.org.mule.runtime.http.api.server.ServerCreationException - if it was not possible to create the Server. Most likely because the host and port is already in use.protected GrizzlyServerManager.ManagedGrizzlyHttpServer createManagedServer(Supplier<org.mule.runtime.api.scheduler.Scheduler> schedulerSupplier, org.mule.runtime.http.api.server.ServerAddress serverAddress, ServerIdentifier identifier, Supplier<Long> shutdownTimeout)
public org.mule.runtime.http.api.server.HttpServer createServerFor(org.mule.runtime.http.api.server.ServerAddress serverAddress,
Supplier<org.mule.runtime.api.scheduler.Scheduler> schedulerSupplier,
boolean usePersistentConnections,
int connectionIdleTimeout,
ServerIdentifier identifier,
Supplier<Long> shutdownTimeout)
throws org.mule.runtime.http.api.server.ServerCreationException
createServerFor in interface HttpServerManagerserverAddress - address of the serverschedulerSupplier - work manager source to use for retrieving an Executor for processing this server requestsusePersistentConnections - if true, the connections will be kept open for subsequent requestsconnectionIdleTimeout - the amount of milliseconds to keep open an idle connection @return the create Server handleridentifier - the id of the servershutdownTimeout - time to wait for persistent connections to be closed when server is stopped.org.mule.runtime.http.api.server.ServerCreationException - if it was not possible to create the Server. Most likely because the host and port is already in use.public org.mule.runtime.http.api.server.HttpServer lookupServer(ServerIdentifier identifier) throws org.mule.runtime.http.api.server.ServerNotFoundException
lookupServer in interface HttpServerManageridentifier - the id of the serverOptional with the corresponding HttpServer or an empty one, if none was foundorg.mule.runtime.http.api.server.ServerNotFoundException - when the desired server was not foundpublic void dispose()
HttpServerManagerdispose in interface HttpServerManagerCopyright © 2003–2021 MuleSoft, Inc.. All rights reserved.