Package org.glassfish.admin.rest.adapter
Class RestAdapter
- java.lang.Object
-
- org.glassfish.grizzly.http.server.HttpHandler
-
- org.glassfish.admin.rest.adapter.RestAdapter
-
- All Implemented Interfaces:
ProxiedRestAdapter
,org.glassfish.hk2.api.PostConstruct
- Direct Known Subclasses:
RestCommandAdapter
,RestManagementAdapter
,RestMonitoringAdapter
public abstract class RestAdapter extends org.glassfish.grizzly.http.server.HttpHandler implements ProxiedRestAdapter, org.glassfish.hk2.api.PostConstruct
Adapter for REST interface- Author:
- Rajeshwar Patil, Ludovic Champenois, [email protected]
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RestAdapter.SubjectReferenceFactory
-
Field Summary
Fields Modifier and Type Field Description protected AdminAccessController
adminAuthenticator
protected static String
COOKIE_GF_REST_UID
protected static String
COOKIE_REST_TOKEN
protected org.glassfish.hk2.api.ServiceLocator
habitat
protected static String
HEADER_ACCEPT
protected static String
HEADER_AUTHENTICATE
protected static String
HEADER_USER_AGENT
protected static String
HEADER_X_AUTH_TOKEN
protected static LocalStringManagerImpl
localStrings
protected ServerContext
sc
protected ServerEnvironment
serverEnvironment
-
Constructor Summary
Constructors Modifier Constructor Description protected
RestAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected JerseyContainer
exposeContext()
dynamically load the class that contains all references to Jersey APIs so that Jersey is not loaded when the RestAdapter is loaded at boot time gain a few 100 millis at GlassFish startup timeprotected Set<? extends org.glassfish.hk2.utilities.Binder>
getAdditionalBinders()
protected String
getContextRoot()
org.glassfish.grizzly.http.server.HttpHandler
getHttpService()
protected JerseyContainer
getJerseyContainer(org.glassfish.jersey.server.ResourceConfig rc)
protected RestResourceProvider
getRestResourceProvider()
void
postConstruct()
void
service(org.glassfish.grizzly.http.server.Request req, org.glassfish.grizzly.http.server.Response res)
protected void
setRestResourceProvider(RestResourceProvider rrp)
-
Methods inherited from class org.glassfish.grizzly.http.server.HttpHandler
destroy, getErrorPageGenerator, getName, getRequestExecutorProvider, getRequestURIEncoding, getSessionCookieName, getSessionManager, isAllowCustomStatusMessage, isAllowEncodedSlash, sendAcknowledgment, setAllowCustomStatusMessage, setAllowEncodedSlash, setDecodeUrl, setDispatcherHelper, setRequestURIEncoding, setRequestURIEncoding, start, updatePaths
-
-
-
-
Field Detail
-
COOKIE_REST_TOKEN
protected static final String COOKIE_REST_TOKEN
- See Also:
- Constant Field Values
-
COOKIE_GF_REST_UID
protected static final String COOKIE_GF_REST_UID
- See Also:
- Constant Field Values
-
HEADER_ACCEPT
protected static final String HEADER_ACCEPT
- See Also:
- Constant Field Values
-
HEADER_USER_AGENT
protected static final String HEADER_USER_AGENT
- See Also:
- Constant Field Values
-
HEADER_X_AUTH_TOKEN
protected static final String HEADER_X_AUTH_TOKEN
- See Also:
- Constant Field Values
-
HEADER_AUTHENTICATE
protected static final String HEADER_AUTHENTICATE
- See Also:
- Constant Field Values
-
localStrings
protected static final LocalStringManagerImpl localStrings
-
habitat
@Inject protected org.glassfish.hk2.api.ServiceLocator habitat
-
sc
@Inject protected ServerContext sc
-
serverEnvironment
@Inject protected ServerEnvironment serverEnvironment
-
adminAuthenticator
@Inject @Optional protected AdminAccessController adminAuthenticator
-
-
Method Detail
-
postConstruct
public void postConstruct()
- Specified by:
postConstruct
in interfaceorg.glassfish.hk2.api.PostConstruct
-
getContextRoot
protected String getContextRoot()
-
getHttpService
public org.glassfish.grizzly.http.server.HttpHandler getHttpService()
- Specified by:
getHttpService
in interfaceProxiedRestAdapter
-
service
public void service(org.glassfish.grizzly.http.server.Request req, org.glassfish.grizzly.http.server.Response res)
- Specified by:
service
in classorg.glassfish.grizzly.http.server.HttpHandler
-
getRestResourceProvider
protected RestResourceProvider getRestResourceProvider()
-
setRestResourceProvider
protected void setRestResourceProvider(RestResourceProvider rrp)
-
getAdditionalBinders
protected Set<? extends org.glassfish.hk2.utilities.Binder> getAdditionalBinders()
-
exposeContext
protected JerseyContainer exposeContext() throws EndpointRegistrationException
dynamically load the class that contains all references to Jersey APIs so that Jersey is not loaded when the RestAdapter is loaded at boot time gain a few 100 millis at GlassFish startup time- Returns:
- Throws:
EndpointRegistrationException
-
getJerseyContainer
protected JerseyContainer getJerseyContainer(org.glassfish.jersey.server.ResourceConfig rc)
-
-