Package org.glassfish.jersey.simple
Class SimpleContainer
java.lang.Object
org.glassfish.jersey.simple.SimpleContainer
- All Implemented Interfaces:
Container,org.simpleframework.http.core.Container
public final class SimpleContainer
extends Object
implements org.simpleframework.http.core.Container, Container
Jersey
Container implementation based on Simple framework
Container.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classprivate static classAn internal binder to enable Simple HTTP container specific types injection.private static classReferencing factory for Simple request.private static classReferencing factory for Simple response.private static final classprivate static final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ApplicationHandlerprivate static final ExtendedLoggerprivate final Typeprivate final Typeprivate ScheduledExecutorServiceFields inherited from interface org.glassfish.jersey.server.spi.Container
DEFAULT_HTTP_PORT, DEFAULT_HTTPS_PORT -
Constructor Summary
ConstructorsConstructorDescriptionSimpleContainer(javax.ws.rs.core.Application application) Create a new Simple framework HTTP container.SimpleContainer(javax.ws.rs.core.Application application, Object parentContext) Create a new Simple framework HTTP container. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidclose(org.simpleframework.http.Response response) Get the Jersey server-side application handler associated with the container.private URIgetBaseUri(org.simpleframework.http.Request request) Return an immutable representation of the currentconfiguration.private URIgetRequestUri(org.simpleframework.http.Request request, URI baseUri) private javax.ws.rs.core.SecurityContextgetSecurityContext(org.simpleframework.http.Request request) private StringgetServerAddress(URI baseUri) voidhandle(org.simpleframework.http.Request request, org.simpleframework.http.Response response) (package private) voidInform this container that the server has been started.(package private) voidInform this container that the server is being stopped.voidreload()Reload the hosted Jersey application using the currentconfiguration.voidreload(ResourceConfig configuration) Reload the hosted Jersey application using a newconfiguration.
-
Field Details
-
logger
-
RequestTYPE
-
ResponseTYPE
-
scheduler
-
appHandler
-
-
Constructor Details
-
SimpleContainer
SimpleContainer(javax.ws.rs.core.Application application, Object parentContext) Create a new Simple framework HTTP container.- Parameters:
application- JAX-RS / Jersey application to be deployed on Simple framework HTTP container.parentContext- DI provider specific context with application's registered bindings.
-
SimpleContainer
SimpleContainer(javax.ws.rs.core.Application application) Create a new Simple framework HTTP container.- Parameters:
application- JAX-RS / Jersey application to be deployed on Simple framework HTTP container.
-
-
Method Details
-
handle
public void handle(org.simpleframework.http.Request request, org.simpleframework.http.Response response) - Specified by:
handlein interfaceorg.simpleframework.http.core.Container
-
getRequestUri
-
getServerAddress
- Throws:
URISyntaxException
-
getBaseUri
-
getSecurityContext
private javax.ws.rs.core.SecurityContext getSecurityContext(org.simpleframework.http.Request request) -
close
private void close(org.simpleframework.http.Response response) -
getConfiguration
Description copied from interface:ContainerReturn an immutable representation of the currentconfiguration.- Specified by:
getConfigurationin interfaceContainer- Returns:
- current configuration of the hosted Jersey application.
-
reload
public void reload()Description copied from interface:ContainerReload the hosted Jersey application using the currentconfiguration. -
reload
Description copied from interface:ContainerReload the hosted Jersey application using a newconfiguration. -
getApplicationHandler
Description copied from interface:ContainerGet the Jersey server-side application handler associated with the container.- Specified by:
getApplicationHandlerin interfaceContainer- Returns:
- Jersey server-side application handler associated with the container.
-
onServerStart
void onServerStart()Inform this container that the server has been started. This method must be implicitly called after the server containing this container is started. -
onServerStop
void onServerStop()Inform this container that the server is being stopped. This method must be implicitly called before the server containing this container is stopped.
-