org.apache.sling.crankstart.testservices

## Class ConfigFactoryServlet

- java.lang.Object
- - javax.servlet.GenericServlet
  - - javax.servlet.http.HttpServlet
    - - org.apache.sling.crankstart.testservices.ConfigFactoryServlet

All Implemented Interfaces:
  Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    @Service(value=javax.servlet.Servlet.class)
    @Reference(name="httpService",
               referenceInterface=org.osgi.service.http.HttpService.class)
    public class ConfigFactoryServlet
    extends javax.servlet.http.HttpServlet

Servlet that requires a configuration, used to test the Crankstart initial config feature with factory configs

See Also:
  Serialized Form

### Field Summary

Fields
`protected org.osgi.service.http.HttpService` `httpService`
`protected org.slf4j.Logger` `log`
`protected String` `message`
`protected String` `path`
`protected static String` `PROP_MESSAGE`
`protected static String` `PROP_PATH`

### Constructor Summary

Constructors
Constructor and Description
`ConfigFactoryServlet()`

### Method Summary

Methods
`protected void` `activate(Map<String,Object> config)`
`protected void` `bindHttpService(org.osgi.service.http.HttpService s)`
`protected void` `deactivate(Map<String,Object> config)`
`protected void` `doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)`
`protected void` `register()`
`protected void` `unbindHttpService(org.osgi.service.http.HttpService s)`
`protected void` `unregister()`

### Methods inherited from class javax.servlet.http.HttpServlet

`doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service`

### Methods inherited from class javax.servlet.GenericServlet

`destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log`

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

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

### Field Detail

#### PROP_MESSAGE

    @Property(value="default message")
    protected static final String PROP_MESSAGE

See Also:
  Constant Field Values

#### PROP_PATH

    @Property(value="/default_path")
    protected static final String PROP_PATH

See Also:
  Constant Field Values

#### message

    protected String message

#### path

    protected String path

#### log

    protected final org.slf4j.Logger log

#### httpService

    protected org.osgi.service.http.HttpService httpService

### Constructor Detail

#### ConfigFactoryServlet

    public ConfigFactoryServlet()

### Method Detail

#### activate

    @Activate
    protected void activate(Map<String,Object> config)
                     throws javax.servlet.ServletException,
                            org.osgi.service.http.NamespaceException

Throws:
  `javax.servlet.ServletException`
  `org.osgi.service.http.NamespaceException`

#### deactivate

    @Deactivate
    protected void deactivate(Map<String,Object> config)
                       throws javax.servlet.ServletException,
                              org.osgi.service.http.NamespaceException

Throws:
  `javax.servlet.ServletException`
  `org.osgi.service.http.NamespaceException`

#### register

    protected void register()
                     throws javax.servlet.ServletException,
                            org.osgi.service.http.NamespaceException

Throws:
  `javax.servlet.ServletException`
  `org.osgi.service.http.NamespaceException`

#### unregister

    protected void unregister()
                       throws javax.servlet.ServletException,
                              org.osgi.service.http.NamespaceException

Throws:
  `javax.servlet.ServletException`
  `org.osgi.service.http.NamespaceException`

#### bindHttpService

    protected void bindHttpService(org.osgi.service.http.HttpService s)

#### unbindHttpService

    protected void unbindHttpService(org.osgi.service.http.HttpService s)

#### doGet

    protected void doGet(javax.servlet.http.HttpServletRequest req,
             javax.servlet.http.HttpServletResponse resp)
                  throws javax.servlet.ServletException,
                         IOException

Overrides:
  `doGet` in class `javax.servlet.http.HttpServlet`
Throws:
  `javax.servlet.ServletException`
  `IOException`