org.glassfish.admin.rest.adapter
Class RestAdapter
java.lang.Object
com.sun.grizzly.tcp.StaticResourcesAdapter
com.sun.grizzly.tcp.http11.GrizzlyAdapter
org.glassfish.admin.rest.adapter.RestAdapter
- All Implemented Interfaces:
- com.sun.grizzly.tcp.Adapter, PostStartup, org.jvnet.hk2.component.PostConstruct
- Direct Known Subclasses:
- RestManagementAdapter, RestMonitoringAdapter
public abstract class RestAdapter
- extends com.sun.grizzly.tcp.http11.GrizzlyAdapter
- implements Adapter, PostStartup, org.jvnet.hk2.component.PostConstruct
Adapter for REST interface
- Author:
- Rajeshwar Patil, Ludovic Champenois
| Fields inherited from class com.sun.grizzly.tcp.http11.GrizzlyAdapter |
ADAPTER_NOTES, ALLOW_BACKSLASH, chunkingDisabled |
| Fields inherited from class com.sun.grizzly.tcp.StaticResourcesAdapter |
cache, commitErrorResponse, fileFolders, resourcesContextPath |
|
Method Summary |
void |
afterService(com.sun.grizzly.tcp.http11.GrizzlyRequest req,
com.sun.grizzly.tcp.http11.GrizzlyResponse res)
Finish the response and recycle the request/response tokens. |
void |
fireAdapterEvent(java.lang.String type,
java.lang.Object data)
Notify all container event listeners that a particular event has
occurred for this Adapter. |
protected LazyJerseyInterface |
getLazyJersey()
|
java.net.InetAddress |
getListenAddress()
|
int |
getListenPort()
|
protected abstract java.util.Set<java.lang.Class<?>> |
getResourcesConfig()
|
java.util.List<java.lang.String> |
getVirtualServers()
|
boolean |
isRegistered()
Checks whether this adapter has been registered as a network endpoint. |
void |
postConstruct()
|
void |
service(com.sun.grizzly.tcp.http11.GrizzlyRequest req,
com.sun.grizzly.tcp.http11.GrizzlyResponse res)
|
void |
setRegistered(boolean isRegistered)
Marks this adapter as having been registered or unregistered as a
network endpoint |
| Methods inherited from class com.sun.grizzly.tcp.http11.GrizzlyAdapter |
afterService, destroy, getName, isAllowEncodedSlash, isDecodeURL, isHandleStaticResources, service, setAllowEncodedSlash, setDecodeUrl, setDispatcherHelper, setHandleStaticResources, start |
| Methods inherited from class com.sun.grizzly.tcp.StaticResourcesAdapter |
addRootFolder, customizedErrorPage, getDefaultContentType, getResourcesContextPath, getRootFolder, getRootFolders, initWebDir, isUseSendFile, service, setDefaultContentType, setLogger, setResourcesContextPath, setRootFolder, setUseSendFile |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sun.grizzly.tcp.Adapter |
afterService, service |
localStrings
public static final LocalStringManagerImpl localStrings
as
protected volatile AdminService as
events
protected Events events
habitat
protected org.jvnet.hk2.component.Habitat habitat
config
protected Config config
latch
protected java.util.concurrent.CountDownLatch latch
sc
protected ServerContext sc
serverEnvironment
protected ServerEnvironment serverEnvironment
sessionManager
protected SessionManager sessionManager
RestAdapter
protected RestAdapter()
postConstruct
public void postConstruct()
- Specified by:
postConstruct in interface org.jvnet.hk2.component.PostConstruct
service
public void service(com.sun.grizzly.tcp.http11.GrizzlyRequest req,
com.sun.grizzly.tcp.http11.GrizzlyResponse res)
- Specified by:
service in class com.sun.grizzly.tcp.http11.GrizzlyAdapter
afterService
public void afterService(com.sun.grizzly.tcp.http11.GrizzlyRequest req,
com.sun.grizzly.tcp.http11.GrizzlyResponse res)
throws java.lang.Exception
- Finish the response and recycle the request/response tokens. Base on
the connection header, the underlying socket transport will be closed
- Overrides:
afterService in class com.sun.grizzly.tcp.http11.GrizzlyAdapter
- Throws:
java.lang.Exception
fireAdapterEvent
public void fireAdapterEvent(java.lang.String type,
java.lang.Object data)
- Notify all container event listeners that a particular event has
occurred for this Adapter. The default implementation performs
this notification synchronously using the calling thread.
- Parameters:
type - Event typedata - Event data
isRegistered
public boolean isRegistered()
- Checks whether this adapter has been registered as a network endpoint.
setRegistered
public void setRegistered(boolean isRegistered)
- Marks this adapter as having been registered or unregistered as a
network endpoint
getListenPort
public int getListenPort()
getListenAddress
public java.net.InetAddress getListenAddress()
getVirtualServers
public java.util.List<java.lang.String> getVirtualServers()
getResourcesConfig
protected abstract java.util.Set<java.lang.Class<?>> getResourcesConfig()
getLazyJersey
protected LazyJerseyInterface getLazyJersey()
Copyright © 2012 GlassFish Community. All Rights Reserved.