org.apache.axis2.osgi.core.web
Class WebApp

java.lang.Object
  extended by org.apache.axis2.osgi.core.web.WebApp
All Implemented Interfaces:
org.osgi.service.http.HttpContext

public class WebApp
extends Object
implements org.osgi.service.http.HttpContext

WebApp is a utility class for describing a WebApplication to be deployed into an OSGi HTTP Service implementation. The WebApp implementation extends the OSGi HttpContext.


Field Summary
protected  org.osgi.service.http.HttpService httpService
           
protected  org.osgi.framework.ServiceReference sRef
           
protected static WebAppDescriptor webAppDescriptor
           
 
Fields inherited from interface org.osgi.service.http.HttpContext
AUTHENTICATION_TYPE, AUTHORIZATION, REMOTE_USER
 
Constructor Summary
WebApp(WebAppDescriptor descriptor)
           
 
Method Summary
 org.osgi.service.http.HttpService getHttpService()
           
 String getMimeType(String reqEntry)
           
 URL getResource(String name)
           
 org.osgi.framework.ServiceReference getSRef()
           
static WebAppDescriptor getWebAppDescriptor()
           
 boolean handleSecurity(HttpServletRequest request, HttpServletResponse response)
           
 void setHttpService(org.osgi.service.http.HttpService httpService)
           
 void setSRef(org.osgi.framework.ServiceReference sRef)
           
static void setWebAppDescriptor(WebAppDescriptor webAppDescriptor)
           
 void start(org.osgi.framework.BundleContext bc)
          Starts the WebApp
 void stop(org.osgi.framework.BundleContext bc)
          Stops the WebApp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

webAppDescriptor

protected static WebAppDescriptor webAppDescriptor

httpService

protected org.osgi.service.http.HttpService httpService

sRef

protected org.osgi.framework.ServiceReference sRef
Constructor Detail

WebApp

public WebApp(WebAppDescriptor descriptor)
Method Detail

getMimeType

public String getMimeType(String reqEntry)
Specified by:
getMimeType in interface org.osgi.service.http.HttpContext

getResource

public URL getResource(String name)
Specified by:
getResource in interface org.osgi.service.http.HttpContext

handleSecurity

public boolean handleSecurity(HttpServletRequest request,
                              HttpServletResponse response)
                       throws IOException
Specified by:
handleSecurity in interface org.osgi.service.http.HttpContext
Throws:
IOException

start

public void start(org.osgi.framework.BundleContext bc)
           throws org.osgi.framework.BundleException
Starts the WebApp

Parameters:
bc - the BundleContext of the WebApp host
Throws:
org.osgi.framework.BundleException

stop

public void stop(org.osgi.framework.BundleContext bc)
          throws org.osgi.framework.BundleException
Stops the WebApp

Parameters:
bc - the BundleContext of the WebApp host
Throws:
org.osgi.framework.BundleException

getWebAppDescriptor

public static WebAppDescriptor getWebAppDescriptor()

setWebAppDescriptor

public static void setWebAppDescriptor(WebAppDescriptor webAppDescriptor)

getHttpService

public org.osgi.service.http.HttpService getHttpService()

setHttpService

public void setHttpService(org.osgi.service.http.HttpService httpService)

getSRef

public org.osgi.framework.ServiceReference getSRef()

setSRef

public void setSRef(org.osgi.framework.ServiceReference sRef)


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.