Package org.apache.felix.http.base.internal.service

# Class HttpServiceFactory

java.lang.Object
org.apache.felix.http.base.internal.service.HttpServiceFactory

All Implemented Interfaces:
  `org.osgi.framework.ServiceFactory<org.osgi.service.http.HttpService>`

public final class HttpServiceFactory extends Object implements org.osgi.framework.ServiceFactory<org.osgi.service.http.HttpService>
The http service factory

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`HTTP_SERVICE_CONTEXT_NAME`
The name of the context for the http service.
`static final long`
`HTTP_SERVICE_CONTEXT_SERVICE_ID`
The id of the context for the http service.

## Constructor Summary

Constructors
Constructor
Description
`HttpServiceFactory(org.osgi.framework.BundleContext bundleContext, HandlerRegistry handlerRegistry)`

## Method Summary

Modifier and Type
Method
Description
`long`
`getHttpServiceServiceId()`
`org.osgi.service.http.HttpService`
`getService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration<org.osgi.service.http.HttpService> reg)`
`void`
`setAttributeSharedServletContext(String key, Object value)`
`void`
`start(jakarta.servlet.ServletContext context, @NotNull Hashtable<String,Object> props)`
`void`
`stop()`
`void`
`ungetService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration<org.osgi.service.http.HttpService> reg, org.osgi.service.http.HttpService service)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### HTTP_SERVICE_CONTEXT_NAME

public static final String HTTP_SERVICE_CONTEXT_NAME
The name of the context for the http service.

See Also:
  - Constant Field Values

### HTTP_SERVICE_CONTEXT_SERVICE_ID

public static final long HTTP_SERVICE_CONTEXT_SERVICE_ID
The id of the context for the http service.

See Also:
  - Constant Field Values

## Constructor Details

### HttpServiceFactory

public HttpServiceFactory(org.osgi.framework.BundleContext bundleContext, HandlerRegistry handlerRegistry)

## Method Details

### start

public void start(jakarta.servlet.ServletContext context, @NotNull @NotNull Hashtable<String,Object> props)

### stop

public void stop()

### getService

public org.osgi.service.http.HttpService getService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration<org.osgi.service.http.HttpService> reg)

Specified by:
  `getService` in interface `org.osgi.framework.ServiceFactory<org.osgi.service.http.HttpService>`

### ungetService

public void ungetService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration<org.osgi.service.http.HttpService> reg, org.osgi.service.http.HttpService service)

Specified by:
  `ungetService` in interface `org.osgi.framework.ServiceFactory<org.osgi.service.http.HttpService>`

### getHttpServiceServiceId

public long getHttpServiceServiceId()

### setAttributeSharedServletContext

public void setAttributeSharedServletContext(String key, Object value)