## org.apache.felix.httplite.osgi
Class DefaultContextImpl

    java.lang.Object
      org.apache.felix.httplite.osgi.DefaultContextImpl

All Implemented Interfaces:
  org.osgi.service.http.HttpContext

    public class DefaultContextImpl

extends java.lang.Object
implements org.osgi.service.http.HttpContext

This class was adapted from the Jetty HTTP Service: http://felix.apache.org/site/apache-felix-http-service.html. Implementation of default HttpContext as per OSGi specification. Notes - no current inclusion/support for permissions - security allows all request. Spec leaves security handling to be implementation specific, but does outline some suggested handling. Deeper than my understanding of HTTP at this stage, so left for now.

Field Summary

Fields inherited from interface org.osgi.service.http.HttpContext
`AUTHENTICATION_TYPE, AUTHORIZATION, REMOTE_USER`

Constructor Summary
`DefaultContextImpl(org.osgi.framework.Bundle bundle)`

Method Summary
`java.lang.String` `getMimeType(java.lang.String name)`
`java.net.URL` `getResource(java.lang.String name)`
`boolean` `handleSecurity(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultContextImpl

    public DefaultContextImpl(org.osgi.framework.Bundle bundle)

Parameters:
  `bundle` - bundle that registered with the Http Service.

Method Detail

### getMimeType

    public java.lang.String getMimeType(java.lang.String name)

  Specified by:
    `getMimeType` in interface `org.osgi.service.http.HttpContext`

### getResource

    public java.net.URL getResource(java.lang.String name)

  Specified by:
    `getResource` in interface `org.osgi.service.http.HttpContext`

### handleSecurity

    public boolean handleSecurity(javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response)

  Specified by:
    `handleSecurity` in interface `org.osgi.service.http.HttpContext`

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