org.apache.felix.httplite.osgi
Class ServiceRegistration
java.lang.Object
org.apache.felix.httplite.osgi.ServiceRegistration
public class ServiceRegistration
- extends java.lang.Object
This class stores the state from a client that registered a Servlet
or resource with the HTTP Service.
Constructor Summary |
ServiceRegistration(java.lang.String alias,
javax.servlet.Servlet servlet,
java.util.Dictionary initparams,
org.osgi.service.http.HttpContext context,
Logger logger)
|
ServiceRegistration(java.lang.String alias,
java.lang.String name,
org.osgi.service.http.HttpContext context,
Logger logger)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceRegistration
public ServiceRegistration(java.lang.String alias,
javax.servlet.Servlet servlet,
java.util.Dictionary initparams,
org.osgi.service.http.HttpContext context,
Logger logger)
- Parameters:
alias
- Alias that the service is registered with.servlet
- Instance of servlet corresponding to alias.initparams
- initial configuration parameterscontext
- HTTP contextlogger
- Logger instance
ServiceRegistration
public ServiceRegistration(java.lang.String alias,
java.lang.String name,
org.osgi.service.http.HttpContext context,
Logger logger)
- Parameters:
alias
- Alias that the service is registered with.name
- name of the resourcecontext
- HTTP contextlogger
- Logger instance
isServlet
public final boolean isServlet()
- Returns:
- true if this registration represents a servlet, false for a resource.
getAlias
public final java.lang.String getAlias()
- Returns:
- Alias of resource
getName
public final java.lang.String getName()
- Returns:
- Name of resource
hasBeenInitialized
public final boolean hasBeenInitialized()
- Returns:
- true if the init() method has been called
on the Servlet at some point in the past, false otherwise.
setInitialized
public final void setInitialized()
- Set the initialized flat to true. Will throw
IllegalStateException() if called multiple times on the same instance.
getServlet
public final javax.servlet.Servlet getServlet()
- Returns:
- the Servlet instance.
getInitparams
public final java.util.Dictionary getInitparams()
- Returns:
- Dictionary of init params.
getContext
public final org.osgi.service.http.HttpContext getContext()
- Returns:
- HttpContext
getServletConfig
public final javax.servlet.ServletConfig getServletConfig()
- Returns:
- the ServletConfig for this servlet.
Copyright © 2006-2012 The Apache Software Foundation. All Rights Reserved.