com.bradmcevoy.http
Class HttpManager
java.lang.Object
com.bradmcevoy.http.HttpManager
public class HttpManager
- extends java.lang.Object
Milton's main class. All the servlets and stuff is just fluff, this is where stuff really starts to happen
- Author:
- brad
|
Method Summary |
void |
addEventListener(EventListener l)
|
void |
addFilter(int pos,
Filter filter)
|
protected Filter |
createStandardFilter()
|
static java.lang.String |
decodeUrl(java.lang.String s)
|
java.util.Collection<Handler> |
getAllHandlers()
|
java.util.List<CustomPostHandler> |
getCustomPostHandlers()
|
EventManager |
getEventManager()
|
java.util.List<Filter> |
getFilters()
|
ProtocolHandlers |
getHandlers()
|
Handler |
getMethodHandler(Request.Method m)
|
PropertyAuthoriser |
getPropertyPermissionService()
|
ResourceFactory |
getResourceFactory()
|
Http11ResponseHandler |
getResponseHandler()
|
Auth |
getSessionAuthentication(Request request)
Deprecated. - use an AuthenticationHandler instead |
SessionAuthenticationHandler |
getSessionAuthenticationHandler()
|
boolean |
isEnableExpectContinue()
|
void |
onGet(Request request,
Response response,
Resource resource,
java.util.Map<java.lang.String,java.lang.String> params)
|
void |
onPost(Request request,
Response response,
Resource resource,
java.util.Map<java.lang.String,java.lang.String> params,
java.util.Map<java.lang.String,FileItem> files)
|
void |
onProcessResourceFinish(Request request,
Response response,
Resource resource,
long duration)
|
void |
onProcessResourceStart(Request request,
Response response,
Resource resource)
|
void |
process(Request request,
Response response)
|
void |
removeEventListener(EventListener l)
|
static Request |
request()
|
static Response |
response()
|
void |
setEnableExpectContinue(boolean enableExpectContinue)
|
void |
setEventListeners(java.util.List<EventListener> eventListeners)
|
void |
setEventManager(EventManager eventManager)
|
void |
setFilters(java.util.List<Filter> filters)
|
void |
setPropertyPermissionService(PropertyAuthoriser propertyPermissionService)
|
void |
setSessionAuthenticationHandler(SessionAuthenticationHandler sessionAuthenticationHandler)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
resourceFactory
protected final ResourceFactory resourceFactory
responseHandler
protected final Http11ResponseHandler responseHandler
HttpManager
public HttpManager(ResourceFactory resourceFactory)
- Creates the manager with a DefaultResponseHandler
- Parameters:
resourceFactory -
HttpManager
public HttpManager(ResourceFactory resourceFactory,
AuthenticationService authenticationService)
HttpManager
public HttpManager(ResourceFactory resourceFactory,
WebDavResponseHandler responseHandler,
AuthenticationService authenticationService)
HttpManager
public HttpManager(ResourceFactory resourceFactory,
WebDavResponseHandler responseHandler,
ProtocolHandlers handlers)
decodeUrl
public static java.lang.String decodeUrl(java.lang.String s)
request
public static Request request()
response
public static Response response()
getMethodHandler
public Handler getMethodHandler(Request.Method m)
getResourceFactory
public ResourceFactory getResourceFactory()
getSessionAuthenticationHandler
public SessionAuthenticationHandler getSessionAuthenticationHandler()
setSessionAuthenticationHandler
public void setSessionAuthenticationHandler(SessionAuthenticationHandler sessionAuthenticationHandler)
getSessionAuthentication
@Deprecated
public Auth getSessionAuthentication(Request request)
- Deprecated. - use an AuthenticationHandler instead
- Parameters:
request -
- Returns:
- - if no SessionAuthenticationHandler has been set returns null. Otherwise,
calls getSessionAuthentication on it and returns the result
process
public void process(Request request,
Response response)
createStandardFilter
protected Filter createStandardFilter()
addFilter
public void addFilter(int pos,
Filter filter)
addEventListener
public void addEventListener(EventListener l)
removeEventListener
public void removeEventListener(EventListener l)
onProcessResourceFinish
public void onProcessResourceFinish(Request request,
Response response,
Resource resource,
long duration)
onProcessResourceStart
public void onProcessResourceStart(Request request,
Response response,
Resource resource)
onPost
public void onPost(Request request,
Response response,
Resource resource,
java.util.Map<java.lang.String,java.lang.String> params,
java.util.Map<java.lang.String,FileItem> files)
onGet
public void onGet(Request request,
Response response,
Resource resource,
java.util.Map<java.lang.String,java.lang.String> params)
getFilters
public java.util.List<Filter> getFilters()
setFilters
public void setFilters(java.util.List<Filter> filters)
setEventListeners
public void setEventListeners(java.util.List<EventListener> eventListeners)
getAllHandlers
public java.util.Collection<Handler> getAllHandlers()
getResponseHandler
public Http11ResponseHandler getResponseHandler()
getHandlers
public ProtocolHandlers getHandlers()
getPropertyPermissionService
public PropertyAuthoriser getPropertyPermissionService()
setPropertyPermissionService
public void setPropertyPermissionService(PropertyAuthoriser propertyPermissionService)
isEnableExpectContinue
public boolean isEnableExpectContinue()
setEnableExpectContinue
public void setEnableExpectContinue(boolean enableExpectContinue)
getEventManager
public EventManager getEventManager()
setEventManager
public void setEventManager(EventManager eventManager)
getCustomPostHandlers
public java.util.List<CustomPostHandler> getCustomPostHandlers()
Copyright © 2011. All Rights Reserved.