de.deepamehta.core.impl
Class WebPublishingService

Show UML class diagram
java.lang.Object
  extended by de.deepamehta.core.impl.WebPublishingService

public class WebPublishingService
extends Object


Nested Class Summary
private  class WebPublishingService.BundleHTTPContext
           
private  class WebPublishingService.DirectoryHTTPContext
           
 
Field Summary
private  int classCount
           
private  EmbeddedService dms
           
private  HttpService httpService
           
private  boolean isJerseyServletRegistered
           
private  com.sun.jersey.spi.container.servlet.ServletContainer jerseyServlet
           
private  Logger logger
           
private static String ROOT_APPLICATION_PATH
           
private  com.sun.jersey.api.core.ResourceConfig rootApplication
           
private  int singletonCount
           
 
Constructor Summary
WebPublishingService(EmbeddedService dms, HttpService httpService)
           
 
Method Summary
private  void addClasses(List<Class<?>> classes)
           
(package private)  RestResource addRestResource(List<Object> resources, List<Class<?>> providerClasses)
          Note: synchronizing this method prevents creation of multiple Jersey servlet instances due to parallel plugin initialization.
private  void addSingletons(List<Object> singletons)
           
(package private)  WebResources addWebResources(Bundle bundle, String uriNamespace)
          Publishes the /web resources directory of the given bundle to the web.
(package private)  WebResources addWebResources(String directoryPath, String uriNamespace, SecurityHandler securityHandler)
          Publishes a directory of the server's file system to the web.
private  Set<Class<?>> getClasses()
           
private  Set<Object> getSingletons()
           
(package private)  String getUriNamespace(Object object)
           
private  boolean hasRootResources()
           
(package private)  boolean isRootResource(Object object)
           
private  void logResourceInfo()
           
private  void registerJerseyServlet()
           
private  void reloadJerseyServlet()
           
private  void removeClasses(List<Class<?>> classes)
           
(package private)  void removeRestResource(RestResource restResource)
           
private  void removeSingletons(List<Object> singletons)
           
(package private)  void removeWebResources(WebResources webResources)
           
private  boolean resourceRequestFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
private  void sendError(javax.servlet.http.HttpServletResponse servletResponse, javax.ws.rs.core.Response response)
           
private  void unregisterJerseyServlet()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT_APPLICATION_PATH

private static final String ROOT_APPLICATION_PATH
See Also:
Constant Field Values

rootApplication

private com.sun.jersey.api.core.ResourceConfig rootApplication

classCount

private int classCount

singletonCount

private int singletonCount

jerseyServlet

private com.sun.jersey.spi.container.servlet.ServletContainer jerseyServlet

isJerseyServletRegistered

private boolean isJerseyServletRegistered

httpService

private HttpService httpService

dms

private EmbeddedService dms

logger

private Logger logger
Constructor Detail

WebPublishingService

public WebPublishingService(EmbeddedService dms,
                            HttpService httpService)
Method Detail

addWebResources

WebResources addWebResources(Bundle bundle,
                             String uriNamespace)
Publishes the /web resources directory of the given bundle to the web.


removeWebResources

void removeWebResources(WebResources webResources)

addWebResources

WebResources addWebResources(String directoryPath,
                             String uriNamespace,
                             SecurityHandler securityHandler)
Publishes a directory of the server's file system to the web.


addRestResource

RestResource addRestResource(List<Object> resources,
                             List<Class<?>> providerClasses)
Note: synchronizing this method prevents creation of multiple Jersey servlet instances due to parallel plugin initialization.

Parameters:
resources - the set of root resource and provider singletons, may be empty.
providerClasses - the set of root resource and provider classes, may be empty.

removeRestResource

void removeRestResource(RestResource restResource)

isRootResource

boolean isRootResource(Object object)

getUriNamespace

String getUriNamespace(Object object)

getClasses

private Set<Class<?>> getClasses()

getSingletons

private Set<Object> getSingletons()

addClasses

private void addClasses(List<Class<?>> classes)

addSingletons

private void addSingletons(List<Object> singletons)

removeClasses

private void removeClasses(List<Class<?>> classes)

removeSingletons

private void removeSingletons(List<Object> singletons)

hasRootResources

private boolean hasRootResources()

logResourceInfo

private void logResourceInfo()

registerJerseyServlet

private void registerJerseyServlet()

unregisterJerseyServlet

private void unregisterJerseyServlet()

reloadJerseyServlet

private void reloadJerseyServlet()

resourceRequestFilter

private boolean resourceRequestFilter(javax.servlet.http.HttpServletRequest request,
                                      javax.servlet.http.HttpServletResponse response)
                               throws IOException
Throws:
IOException

sendError

private void sendError(javax.servlet.http.HttpServletResponse servletResponse,
                       javax.ws.rs.core.Response response)
                throws IOException
Throws:
IOException


Copyright © 2013. All Rights Reserved.