|
SMILA (incubation) API documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.smila.http.server.util.ARequestHandler
public abstract class ARequestHandler
Abstract base class for RequestHandler implementations. Provides methods to access the properties of the ComponentContext and a implementation for method match();
Constructor Summary | |
---|---|
ARequestHandler()
|
Method Summary | |
---|---|
protected void |
activate(ComponentContext context)
OSGi Declarative Services service activation method. |
java.util.List<java.lang.String> |
getDynamicUriParts(java.lang.String requestUri)
return the dynamic parts of the URL as defined by the URI pattern. |
java.lang.String |
getRootContextPath()
|
java.lang.String |
getStaticUriParts(java.lang.String requestUri)
Return static part of request uri (depends on uri pattern of http handler). |
java.lang.String |
getUriPattern()
Return the URI pattern below the root context path that this RequestHandler serves. |
boolean |
matches(java.lang.String requestUri)
Checks if the URI pattern matches the given requestUri. |
protected java.lang.String |
urlDecode(java.lang.String urlPart)
decode a part of an URL. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.smila.http.server.HttpHandler |
---|
handle |
Constructor Detail |
---|
public ARequestHandler()
Method Detail |
---|
public final java.lang.String getRootContextPath()
getRootContextPath
in interface HttpHandler
public final java.lang.String getUriPattern()
getUriPattern
in interface RequestHandler
public final boolean matches(java.lang.String requestUri)
matches
in interface RequestHandler
requestUri
- a requestUri
public final java.util.List<java.lang.String> getDynamicUriParts(java.lang.String requestUri)
requestUri
- request URI
public final java.lang.String getStaticUriParts(java.lang.String requestUri)
requestUri
- e.g. "http://localhost:8050/SMILA/handler/todo/"
protected void activate(ComponentContext context)
context
- OSGi service component context.protected java.lang.String urlDecode(java.lang.String urlPart)
urlPart
- part of a request URL
|
SMILA (incubation) API documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |