net.floodlightcontroller.debugevent.web
Class DebugEventResource

java.lang.Object
  extended by org.restlet.resource.Resource
      extended by org.restlet.resource.ServerResource
          extended by net.floodlightcontroller.debugevent.web.DebugEventResourceBase
              extended by net.floodlightcontroller.debugevent.web.DebugEventResource

public class DebugEventResource
extends DebugEventResourceBase

Web interface for Debug Events

Author:
Saurav

Nested Class Summary
static class DebugEventResource.DebugEventInfoOutput
          The output JSON model that contains the counter information
static class DebugEventResource.DebugEventPost
           
static class DebugEventResource.Option
           
static class DebugEventResource.ResetOutput
           
 
Field Summary
protected static org.slf4j.Logger logger
           
 
Fields inherited from class net.floodlightcontroller.debugevent.web.DebugEventResourceBase
debugEvent
 
Constructor Summary
DebugEventResource()
           
 
Method Summary
 DebugEventResource.DebugEventInfoOutput handleEventInfoQuery()
          Return the debug event data for the get rest-api call URL must be in one of the following forms for retrieving a list moduleNames "http://{controller-hostname}:8080/wm/debugevent/ counterNames "http://{controller-hostname}:8080/wm/debugevent/{moduleName} URL must be in one of the following forms for retrieving event data: "http://{controller-hostname}:8080/wm/debugevent/{param1} "http://{controller-hostname}:8080/wm/debugevent/{param1}/{param2} where {param1} must be one of (no quotes): null if nothing is given then by default the list of all moduleNames is returned for which events have been registered "all" can return value/info on all active events but is currently disallowed "{moduleName}" returns value/info on events for the specified module depending on the value of param2 and {param2} must be one of (no quotes): null returns all eventNames registered for the given moduleName (in param1) "{eventName}" returns value/info for specific event if it is active.
 DebugEventResource.ResetOutput postHandler(DebugEventResource.DebugEventPost postData)
          Reset events If using curl: curl -X POST -d {\"reset\":true} -H "Content-Type: application/json" URL where URL must be in one of the following forms for resetting registered events: "http://{controller-hostname}:8080/wm/debugevent/ "http://{controller-hostname}:8080/wm/debugevent/{param1} "http://{controller-hostname}:8080/wm/debugevent/{param1}/{param2} Not giving {param1} will reset all events {param1} can be 'all' or the name of a module.
 
Methods inherited from class net.floodlightcontroller.debugevent.web.DebugEventResourceBase
doInit
 
Methods inherited from class org.restlet.resource.ServerResource
abort, commit, delete, delete, describeVariants, doCatch, doConditionalHandle, doError, doHandle, doHandle, doNegotiatedHandle, get, get, getAttribute, getInfo, getInfo, getOnSent, getPreferredVariant, getRole, getVariants, getVariants, handle, hasAnnotations, head, head, isAnnotated, isAutoCommitting, isCommitted, isConditional, isExisting, isInRole, isNegotiated, options, options, patch, patch, post, post, put, put, redirectPermanent, redirectPermanent, redirectSeeOther, redirectSeeOther, redirectTemporary, redirectTemporary, setAllowedMethods, setAnnotated, setAttribute, setAutoCommitting, setChallengeRequests, setCommitted, setConditional, setCookieSettings, setDimensions, setExisting, setLocationRef, setLocationRef, setNegotiated, setOnSent, setProxyChallengeRequests, setServerInfo, setStatus, setStatus, setStatus, setStatus, updateAllowedMethods, updateDimensions
 
Methods inherited from class org.restlet.resource.Resource
doError, doRelease, getAllowedMethods, getApplication, getChallengeRequests, getChallengeResponse, getClientInfo, getConditions, getConnegService, getContext, getConverterService, getCookies, getCookieSettings, getDimensions, getHostRef, getLocationRef, getLogger, getMatrix, getMatrixValue, getMaxForwards, getMetadataService, getMethod, getOriginalRef, getProtocol, getProxyChallengeRequests, getProxyChallengeResponse, getQuery, getQueryValue, getRanges, getReference, getReferrerRef, getRequest, getRequestAttributes, getRequestCacheDirectives, getRequestEntity, getResponse, getResponseAttributes, getResponseCacheDirectives, getResponseEntity, getRootRef, getServerInfo, getStatus, getStatusService, init, isConfidential, isLoggable, release, setApplication, setQueryValue, setRequest, setResponse, toObject, toRepresentation, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected static org.slf4j.Logger logger
Constructor Detail

DebugEventResource

public DebugEventResource()
Method Detail

postHandler

@Post
public DebugEventResource.ResetOutput postHandler(DebugEventResource.DebugEventPost postData)
Reset events If using curl: curl -X POST -d {\"reset\":true} -H "Content-Type: application/json" URL where URL must be in one of the following forms for resetting registered events: "http://{controller-hostname}:8080/wm/debugevent/ "http://{controller-hostname}:8080/wm/debugevent/{param1} "http://{controller-hostname}:8080/wm/debugevent/{param1}/{param2} Not giving {param1} will reset all events {param1} can be 'all' or the name of a module. The former case will reset all events, while the latter will reset all events for the moduleName (if param2 is null).{param2} must be an eventName for the given moduleName to reset a specific event.


handleEventInfoQuery

@Get(value="json")
public DebugEventResource.DebugEventInfoOutput handleEventInfoQuery()
Return the debug event data for the get rest-api call URL must be in one of the following forms for retrieving a list moduleNames "http://{controller-hostname}:8080/wm/debugevent/ counterNames "http://{controller-hostname}:8080/wm/debugevent/{moduleName} URL must be in one of the following forms for retrieving event data: "http://{controller-hostname}:8080/wm/debugevent/{param1} "http://{controller-hostname}:8080/wm/debugevent/{param1}/{param2} where {param1} must be one of (no quotes): null if nothing is given then by default the list of all moduleNames is returned for which events have been registered "all" can return value/info on all active events but is currently disallowed "{moduleName}" returns value/info on events for the specified module depending on the value of param2 and {param2} must be one of (no quotes): null returns all eventNames registered for the given moduleName (in param1) "{eventName}" returns value/info for specific event if it is active.