com.sun.grizzly.osgi.httpservice
Class OSGiResourceAdapter
java.lang.Object
com.sun.grizzly.tcp.StaticResourcesAdapter
com.sun.grizzly.tcp.http11.GrizzlyAdapter
com.sun.grizzly.osgi.httpservice.OSGiResourceAdapter
- All Implemented Interfaces:
- OSGiGrizzlyAdapter, Adapter
public class OSGiResourceAdapter
- extends GrizzlyAdapter
- implements OSGiGrizzlyAdapter
OSGi Resource Adapter.
OSGi Resource registration integration.
- Author:
- Hubert Iwaniuk
Methods inherited from class com.sun.grizzly.tcp.http11.GrizzlyAdapter |
afterService, afterService, destroy, isAllowEncodedSlash, isDecodeURL, isHandleStaticResources, service, setAllowEncodedSlash, setDecodeUrl, 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 |
OSGiResourceAdapter
public OSGiResourceAdapter(String alias,
String prefix,
org.osgi.service.http.HttpContext httpContext,
Logger logger)
- Default constructor.
- Parameters:
alias
- Registered under this alias.prefix
- Internal prefix.httpContext
- Backing HttpContext
.logger
- Logger utility.
service
public void service(GrizzlyRequest request,
GrizzlyResponse response)
- This method should contains the logic for any http extension to the
Grizzly HTTP Webserver.
- Specified by:
service
in class GrizzlyAdapter
- Parameters:
request
- The GrizzlyRequest
response
- The GrizzlyResponse
getProcessingLock
public ReentrantReadWriteLock.ReadLock getProcessingLock()
- Processing lock.
ReentrantReadWriteLock.ReadLock
can be obtained by concurrent threads at the same time.
- Specified by:
getProcessingLock
in interface OSGiGrizzlyAdapter
- Returns:
- Processing lock.
getRemovalLock
public ReentrantReadWriteLock.WriteLock getRemovalLock()
- Removal lock.
ReentrantReadWriteLock.WriteLock
can be obtained only by one thread, blocks OSGiGrizzlyAdapter.getProcessingLock()
.
- Specified by:
getRemovalLock
in interface OSGiGrizzlyAdapter
- Returns:
- Removal lock.
- See Also:
OSGiGrizzlyAdapter.getProcessingLock()
,
ReentrantReadWriteLock.WriteLock
Copyright © 2012 Oracle Corporation. All Rights Reserved.