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, sanjeeb.sahoo@oracle.com
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRestAdapter.SubjectReferenceFactory
-
Field Summary
Fields Modifier and Type Field Description protected AdminAccessControlleradminAuthenticatorprotected static StringCOOKIE_GF_REST_UIDprotected static StringCOOKIE_REST_TOKENprotected org.glassfish.hk2.api.ServiceLocatorhabitatprotected static StringHEADER_ACCEPTprotected static StringHEADER_AUTHENTICATEprotected static StringHEADER_USER_AGENTprotected static StringHEADER_X_AUTH_TOKENprotected static LocalStringManagerImpllocalStringsprotected ServerContextscprotected ServerEnvironmentserverEnvironment
-
Constructor Summary
Constructors Modifier Constructor Description protectedRestAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected JerseyContainerexposeContext()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 StringgetContextRoot()org.glassfish.grizzly.http.server.HttpHandlergetHttpService()protected JerseyContainergetJerseyContainer(org.glassfish.jersey.server.ResourceConfig rc)protected RestResourceProvidergetRestResourceProvider()voidpostConstruct()voidservice(org.glassfish.grizzly.http.server.Request req, org.glassfish.grizzly.http.server.Response res)protected voidsetRestResourceProvider(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:
postConstructin interfaceorg.glassfish.hk2.api.PostConstruct
-
getContextRoot
protected String getContextRoot()
-
getHttpService
public org.glassfish.grizzly.http.server.HttpHandler getHttpService()
- Specified by:
getHttpServicein interfaceProxiedRestAdapter
-
service
public void service(org.glassfish.grizzly.http.server.Request req, org.glassfish.grizzly.http.server.Response res)- Specified by:
servicein 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)
-
-