Package edu.wpi.grip.core.http
Class PedanticHandler
- java.lang.Object
- 
- org.eclipse.jetty.util.component.AbstractLifeCycle
- 
- org.eclipse.jetty.util.component.ContainerLifeCycle
- 
- org.eclipse.jetty.server.handler.AbstractHandler
- 
- edu.wpi.grip.core.http.GenericHandler
- 
- edu.wpi.grip.core.http.PedanticHandler
 
 
 
 
 
- 
- All Implemented Interfaces:
- org.eclipse.jetty.server.Handler,- org.eclipse.jetty.util.component.Container,- org.eclipse.jetty.util.component.Destroyable,- org.eclipse.jetty.util.component.Dumpable,- org.eclipse.jetty.util.component.LifeCycle
 - Direct Known Subclasses:
- DataHandler,- HttpImageHandler,- HttpPipelineSwitcher
 
 public abstract class PedanticHandler extends GenericHandler A handler that will only run if a request is on the same path as its context.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycleorg.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener
 
- 
 - 
Field Summary- 
Fields inherited from class edu.wpi.grip.core.http.GenericHandlerCONTENT_TYPE_HTML, CONTENT_TYPE_JSON, CONTENT_TYPE_PLAIN_TEXT, context
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedPedanticHandler(ContextStore store, java.lang.String context)Creates a new handler for the given context.protectedPedanticHandler(ContextStore store, java.lang.String context, boolean doClaim)Creates a new handler for the given context.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidhandle(java.lang.String target, org.eclipse.jetty.server.Request baseRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)protected abstract voidhandleIfPassed(java.lang.String target, org.eclipse.jetty.server.Request baseRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Handles an HTTP request if the target is the same as the one for this handler.- 
Methods inherited from class edu.wpi.grip.core.http.GenericHandlergetContext, isGet, isPost, releaseContext, sendTextContent
 - 
Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandlerdestroy, doStart, doStop, dumpThis, getServer, setServer
 - 
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycleaddBean, addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans
 - 
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycleaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
 
- 
 
- 
- 
- 
Constructor Detail- 
PedanticHandlerprotected PedanticHandler(ContextStore store, java.lang.String context) Creates a new handler for the given context. That context will not be claimed.- Parameters:
- store- the- ContextStoreto store this context in
- context- the context for this handler
- See Also:
- GenericHandler(ContextStore, String)
 
 - 
PedanticHandlerprotected PedanticHandler(ContextStore store, java.lang.String context, boolean doClaim) Creates a new handler for the given context.- Parameters:
- store- the- ContextStoreto store this context in
- context- the context for this handler
- doClaim- if the context should be claimed
- See Also:
- GenericHandler(ContextStore, String, boolean)
 
 
- 
 - 
Method Detail- 
handlepublic final void handle(java.lang.String target, org.eclipse.jetty.server.Request baseRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException- Throws:
- java.io.IOException
- javax.servlet.ServletException
 
 - 
handleIfPassedprotected abstract void handleIfPassed(java.lang.String target, org.eclipse.jetty.server.Request baseRequest, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletExceptionHandles an HTTP request if the target is the same as the one for this handler.- Parameters:
- target- the target of the HTTP request (e.g. a request on "localhost:8080/foo/bar" has a target of "foo/bar")
- baseRequest- the base HTTP request
- request- the request after being wrapped or filtered by other handlers
- response- the HTTP response to send to the client
- Throws:
- java.io.IOException- if an I/O error occurred while handling the request
- javax.servlet.ServletException- if the request could not be handled
- See Also:
- Handler.handle(String, Request, HttpServletRequest, HttpServletResponse)
 
 
- 
 
-