test_class.declarator: context
test_class.modifier: private
test_class.original_string: private ServletContext context;
test_class.type: ServletContext
test_class.var_name: context
test_class.declarator: config
test_class.modifier: private
test_class.original_string: private ServletConfig config;
test_class.type: ServletConfig
test_class.var_name: config
test_class.declarator: request
test_class.modifier: private
test_class.original_string: private HttpServletRequest request;
test_class.type: HttpServletRequest
test_class.var_name: request
test_class.declarator: response
test_class.modifier: private
test_class.original_string: private HttpServletResponse response;
test_class.type: HttpServletResponse
test_class.var_name: response
test_class.declarator: servlet
test_class.modifier: private
test_class.original_string: private AgentServlet servlet;
test_class.type: AgentServlet
test_class.var_name: servlet
test_class.file: agent/core/src/test/java/org/jolokia/http/AgentServletTest.java
test_class.identifier: AgentServletTest
test_case.body: @Test
      public void initWithAgentDiscoveryAndGivenUrl() throws ServletException, IOException, InterruptedException {
          checkMulticastAvailable();
          String url = "http://localhost:8080/jolokia";
          prepareStandardInitialisation(ConfigKey.DISCOVERY_AGENT_URL.getKeyValue(), url);
          String multicastGroup = ConfigKey.MULTICAST_GROUP.getDefaultValue();
          int multicastPort = Integer.valueOf(ConfigKey.MULTICAST_PORT.getDefaultValue());
          // Wait listening thread to warm up
          Thread.sleep(1000);
          try {
              JolokiaDiscovery discovery = new JolokiaDiscovery("test", new QuietLogHandler());
              List<JSONObject> in = discovery.lookupAgentsWithTimeoutAndMulticastAddress(500, multicastGroup, multicastPort);
              for (JSONObject json : in) {
                  if (json.get("url") != null && json.get("url").equals(url)) {
                      return;
                  }
              }
              fail("No agent found");
          } finally {
              servlet.destroy();
          }
      }
test_case.class_method_signature: AgentServletTest.initWithAgentDiscoveryAndGivenUrl()
test_case.full_signature: @Test public void initWithAgentDiscoveryAndGivenUrl()
test_case.identifier: initWithAgentDiscoveryAndGivenUrl
test_case.invocations: checkMulticastAvailable prepareStandardInitialisation getKeyValue getDefaultValue valueOf getDefaultValue sleep lookupAgentsWithTimeoutAndMulticastAddress get equals get fail destroy
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void initWithAgentDiscoveryAndGivenUrl()
focal_class.declarator: serialVersionUID = 42L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 42L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: httpGetHandler
focal_class.modifier: private
focal_class.original_string: private ServletRequestHandler httpGetHandler, httpPostHandler;
focal_class.type: ServletRequestHandler
focal_class.var_name: httpGetHandler
focal_class.declarator: backendManager
focal_class.modifier: private
focal_class.original_string: private BackendManager backendManager;
focal_class.type: BackendManager
focal_class.var_name: backendManager
focal_class.declarator: logHandler
focal_class.modifier: private
focal_class.original_string: private LogHandler logHandler;
focal_class.type: LogHandler
focal_class.var_name: logHandler
focal_class.declarator: requestHandler
focal_class.modifier: private
focal_class.original_string: private HttpRequestHandler requestHandler;
focal_class.type: HttpRequestHandler
focal_class.var_name: requestHandler
focal_class.declarator: restrictor
focal_class.modifier: private
focal_class.original_string: private Restrictor restrictor;
focal_class.type: Restrictor
focal_class.var_name: restrictor
focal_class.declarator: configMimeType
focal_class.modifier: private
focal_class.original_string: private String configMimeType;
focal_class.type: String
focal_class.var_name: configMimeType
focal_class.declarator: discoveryMulticastResponder
focal_class.modifier: private
focal_class.original_string: private DiscoveryMulticastResponder discoveryMulticastResponder;
focal_class.type: DiscoveryMulticastResponder
focal_class.var_name: discoveryMulticastResponder
focal_class.declarator: allowDnsReverseLookup
focal_class.modifier: private
focal_class.original_string: private boolean allowDnsReverseLookup;
focal_class.type: boolean
focal_class.var_name: allowDnsReverseLookup
focal_class.declarator: streamingEnabled
focal_class.modifier: private
focal_class.original_string: private boolean streamingEnabled;
focal_class.type: boolean
focal_class.var_name: streamingEnabled
focal_class.file: agent/core/src/main/java/org/jolokia/http/AgentServlet.java
focal_class.identifier: AgentServlet
focal_class.class_method_signature: AgentServlet.AgentServlet()
focal_class.full_signature: public  AgentServlet()
focal_class.identifier: AgentServlet
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  AgentServlet()
focal_class.class_method_signature: AgentServlet.AgentServlet(Restrictor pRestrictor)
focal_class.full_signature: public  AgentServlet(Restrictor pRestrictor)
focal_class.identifier: AgentServlet
focal_class.modifiers: public
focal_class.parameters: (Restrictor pRestrictor)
focal_class.signature:  AgentServlet(Restrictor pRestrictor)
focal_class.class_method_signature: AgentServlet.getLogHandler()
focal_class.full_signature: protected LogHandler getLogHandler()
focal_class.identifier: getLogHandler
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: LogHandler
focal_class.signature: LogHandler getLogHandler()
focal_class.class_method_signature: AgentServlet.init(ServletConfig pServletConfig)
focal_class.full_signature: @Override public void init(ServletConfig pServletConfig)
focal_class.identifier: init
focal_class.modifiers: @Override public
focal_class.parameters: (ServletConfig pServletConfig)
focal_class.return: void
focal_class.signature: void init(ServletConfig pServletConfig)
focal_class.class_method_signature: AgentServlet.addJsr160DispatcherIfExternallyConfigured(Configuration pConfig)
focal_class.full_signature: private void addJsr160DispatcherIfExternallyConfigured(Configuration pConfig)
focal_class.identifier: addJsr160DispatcherIfExternallyConfigured
focal_class.modifiers: private
focal_class.parameters: (Configuration pConfig)
focal_class.return: void
focal_class.signature: void addJsr160DispatcherIfExternallyConfigured(Configuration pConfig)
focal_class.class_method_signature: AgentServlet.createRestrictor(Configuration config)
focal_class.full_signature: protected Restrictor createRestrictor(Configuration config)
focal_class.identifier: createRestrictor
focal_class.modifiers: protected
focal_class.parameters: (Configuration config)
focal_class.return: Restrictor
focal_class.signature: Restrictor createRestrictor(Configuration config)
focal_class.class_method_signature: AgentServlet.initDiscoveryMulticast(Configuration pConfig)
focal_class.full_signature: private void initDiscoveryMulticast(Configuration pConfig)
focal_class.identifier: initDiscoveryMulticast
focal_class.modifiers: private
focal_class.parameters: (Configuration pConfig)
focal_class.return: void
focal_class.signature: void initDiscoveryMulticast(Configuration pConfig)
focal_class.class_method_signature: AgentServlet.findAgentUrl(Configuration pConfig)
focal_class.full_signature: private String findAgentUrl(Configuration pConfig)
focal_class.identifier: findAgentUrl
focal_class.modifiers: private
focal_class.parameters: (Configuration pConfig)
focal_class.return: String
focal_class.signature: String findAgentUrl(Configuration pConfig)
focal_class.class_method_signature: AgentServlet.listenForDiscoveryMcRequests(Configuration pConfig)
focal_class.full_signature: private boolean listenForDiscoveryMcRequests(Configuration pConfig)
focal_class.identifier: listenForDiscoveryMcRequests
focal_class.modifiers: private
focal_class.parameters: (Configuration pConfig)
focal_class.return: boolean
focal_class.signature: boolean listenForDiscoveryMcRequests(Configuration pConfig)
focal_class.class_method_signature: AgentServlet.getOrDefault(ConfigKey configKey, String sysEnvKey, Configuration pConfig, Class<T> clazz)
focal_class.full_signature: private T getOrDefault(ConfigKey configKey, String sysEnvKey, Configuration pConfig, Class<T> clazz)
focal_class.identifier: getOrDefault
focal_class.modifiers: private
focal_class.parameters: (ConfigKey configKey, String sysEnvKey, Configuration pConfig, Class<T> clazz)
focal_class.return: T
focal_class.signature: T getOrDefault(ConfigKey configKey, String sysEnvKey, Configuration pConfig, Class<T> clazz)
focal_class.class_method_signature: AgentServlet.getAsType(String property, Class<T> clazz)
focal_class.full_signature: private T getAsType(String property, Class<T> clazz)
focal_class.identifier: getAsType
focal_class.modifiers: private
focal_class.parameters: (String property, Class<T> clazz)
focal_class.return: T
focal_class.signature: T getAsType(String property, Class<T> clazz)
focal_class.class_method_signature: AgentServlet.createLogHandler(ServletConfig pServletConfig, final boolean pDebug)
focal_class.full_signature: protected LogHandler createLogHandler(ServletConfig pServletConfig, final boolean pDebug)
focal_class.identifier: createLogHandler
focal_class.modifiers: protected
focal_class.parameters: (ServletConfig pServletConfig, final boolean pDebug)
focal_class.return: LogHandler
focal_class.signature: LogHandler createLogHandler(ServletConfig pServletConfig, final boolean pDebug)
focal_class.class_method_signature: AgentServlet.destroy()
focal_class.full_signature: @Override public void destroy()
focal_class.identifier: destroy
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void destroy()
focal_class.class_method_signature: AgentServlet.doGet(HttpServletRequest req, HttpServletResponse resp)
focal_class.full_signature: @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp)
focal_class.identifier: doGet
focal_class.modifiers: @Override protected
focal_class.parameters: (HttpServletRequest req, HttpServletResponse resp)
focal_class.return: void
focal_class.signature: void doGet(HttpServletRequest req, HttpServletResponse resp)
focal_class.class_method_signature: AgentServlet.doPost(HttpServletRequest req, HttpServletResponse resp)
focal_class.full_signature: @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp)
focal_class.identifier: doPost
focal_class.modifiers: @Override protected
focal_class.parameters: (HttpServletRequest req, HttpServletResponse resp)
focal_class.return: void
focal_class.signature: void doPost(HttpServletRequest req, HttpServletResponse resp)
focal_class.class_method_signature: AgentServlet.doOptions(HttpServletRequest req, HttpServletResponse resp)
focal_class.full_signature: @Override protected void doOptions(HttpServletRequest req, HttpServletResponse resp)
focal_class.identifier: doOptions
focal_class.modifiers: @Override protected
focal_class.parameters: (HttpServletRequest req, HttpServletResponse resp)
focal_class.return: void
focal_class.signature: void doOptions(HttpServletRequest req, HttpServletResponse resp)
focal_class.class_method_signature: AgentServlet.handle(ServletRequestHandler pReqHandler,HttpServletRequest pReq, HttpServletResponse pResp)
focal_class.full_signature: @SuppressWarnings({ "PMD.AvoidCatchingThrowable", "PMD.AvoidInstanceofChecksInCatchClause" }) private void handle(ServletRequestHandler pReqHandler,HttpServletRequest pReq, HttpServletResponse pResp)
focal_class.identifier: handle
focal_class.modifiers: @SuppressWarnings({ "PMD.AvoidCatchingThrowable", "PMD.AvoidInstanceofChecksInCatchClause" }) private
focal_class.parameters: (ServletRequestHandler pReqHandler,HttpServletRequest pReq, HttpServletResponse pResp)
focal_class.return: void
focal_class.signature: void handle(ServletRequestHandler pReqHandler,HttpServletRequest pReq, HttpServletResponse pResp)
focal_class.class_method_signature: AgentServlet.handleSecurely(final ServletRequestHandler pReqHandler, final HttpServletRequest pReq, final HttpServletResponse pResp)
focal_class.full_signature: private JSONAware handleSecurely(final ServletRequestHandler pReqHandler, final HttpServletRequest pReq, final HttpServletResponse pResp)
focal_class.identifier: handleSecurely
focal_class.modifiers: private
focal_class.parameters: (final ServletRequestHandler pReqHandler, final HttpServletRequest pReq, final HttpServletResponse pResp)
focal_class.return: JSONAware
focal_class.signature: JSONAware handleSecurely(final ServletRequestHandler pReqHandler, final HttpServletRequest pReq, final HttpServletResponse pResp)
focal_class.class_method_signature: AgentServlet.getOriginOrReferer(HttpServletRequest pReq)
focal_class.full_signature: private String getOriginOrReferer(HttpServletRequest pReq)
focal_class.identifier: getOriginOrReferer
focal_class.modifiers: private
focal_class.parameters: (HttpServletRequest pReq)
focal_class.return: String
focal_class.signature: String getOriginOrReferer(HttpServletRequest pReq)
focal_class.class_method_signature: AgentServlet.updateAgentDetailsIfNeeded(HttpServletRequest pReq)
focal_class.full_signature: private void updateAgentDetailsIfNeeded(HttpServletRequest pReq)
focal_class.identifier: updateAgentDetailsIfNeeded
focal_class.modifiers: private
focal_class.parameters: (HttpServletRequest pReq)
focal_class.return: void
focal_class.signature: void updateAgentDetailsIfNeeded(HttpServletRequest pReq)
focal_class.class_method_signature: AgentServlet.extractServletPath(HttpServletRequest pReq)
focal_class.full_signature: private String extractServletPath(HttpServletRequest pReq)
focal_class.identifier: extractServletPath
focal_class.modifiers: private
focal_class.parameters: (HttpServletRequest pReq)
focal_class.return: String
focal_class.signature: String extractServletPath(HttpServletRequest pReq)
focal_class.class_method_signature: AgentServlet.getBaseUrl(String pUrl, String pServletPath)
focal_class.full_signature: private String getBaseUrl(String pUrl, String pServletPath)
focal_class.identifier: getBaseUrl
focal_class.modifiers: private
focal_class.parameters: (String pUrl, String pServletPath)
focal_class.return: String
focal_class.signature: String getBaseUrl(String pUrl, String pServletPath)
focal_class.class_method_signature: AgentServlet.getIpIfPossible(String pHost)
focal_class.full_signature: private String getIpIfPossible(String pHost)
focal_class.identifier: getIpIfPossible
focal_class.modifiers: private
focal_class.parameters: (String pHost)
focal_class.return: String
focal_class.signature: String getIpIfPossible(String pHost)
focal_class.class_method_signature: AgentServlet.plainReplacement(String pUrl, String pServletPath)
focal_class.full_signature: private String plainReplacement(String pUrl, String pServletPath)
focal_class.identifier: plainReplacement
focal_class.modifiers: private
focal_class.parameters: (String pUrl, String pServletPath)
focal_class.return: String
focal_class.signature: String plainReplacement(String pUrl, String pServletPath)
focal_class.class_method_signature: AgentServlet.setCorsHeader(HttpServletRequest pReq, HttpServletResponse pResp)
focal_class.full_signature: private void setCorsHeader(HttpServletRequest pReq, HttpServletResponse pResp)
focal_class.identifier: setCorsHeader
focal_class.modifiers: private
focal_class.parameters: (HttpServletRequest pReq, HttpServletResponse pResp)
focal_class.return: void
focal_class.signature: void setCorsHeader(HttpServletRequest pReq, HttpServletResponse pResp)
focal_class.class_method_signature: AgentServlet.isStreamingEnabled(HttpServletRequest pReq)
focal_class.full_signature: private boolean isStreamingEnabled(HttpServletRequest pReq)
focal_class.identifier: isStreamingEnabled
focal_class.modifiers: private
focal_class.parameters: (HttpServletRequest pReq)
focal_class.return: boolean
focal_class.signature: boolean isStreamingEnabled(HttpServletRequest pReq)
focal_class.class_method_signature: AgentServlet.newPostHttpRequestHandler()
focal_class.full_signature: private ServletRequestHandler newPostHttpRequestHandler()
focal_class.identifier: newPostHttpRequestHandler
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: ServletRequestHandler
focal_class.signature: ServletRequestHandler newPostHttpRequestHandler()
focal_class.class_method_signature: AgentServlet.newGetHttpRequestHandler()
focal_class.full_signature: private ServletRequestHandler newGetHttpRequestHandler()
focal_class.identifier: newGetHttpRequestHandler
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: ServletRequestHandler
focal_class.signature: ServletRequestHandler newGetHttpRequestHandler()
focal_class.class_method_signature: AgentServlet.getParameterMap(HttpServletRequest pReq)
focal_class.full_signature: private Map<String, String[]> getParameterMap(HttpServletRequest pReq)
focal_class.identifier: getParameterMap
focal_class.modifiers: private
focal_class.parameters: (HttpServletRequest pReq)
focal_class.return: Map<String, String[]>
focal_class.signature: Map<String, String[]> getParameterMap(HttpServletRequest pReq)
focal_class.class_method_signature: AgentServlet.initConfig(ServletConfig pConfig)
focal_class.full_signature:  Configuration initConfig(ServletConfig pConfig)
focal_class.identifier: initConfig
focal_class.parameters: (ServletConfig pConfig)
focal_class.return: Configuration
focal_class.signature: Configuration initConfig(ServletConfig pConfig)
focal_class.class_method_signature: AgentServlet.sendResponse(HttpServletResponse pResp, HttpServletRequest pReq, JSONAware pJson)
focal_class.full_signature: private void sendResponse(HttpServletResponse pResp, HttpServletRequest pReq, JSONAware pJson)
focal_class.identifier: sendResponse
focal_class.modifiers: private
focal_class.parameters: (HttpServletResponse pResp, HttpServletRequest pReq, JSONAware pJson)
focal_class.return: void
focal_class.signature: void sendResponse(HttpServletResponse pResp, HttpServletRequest pReq, JSONAware pJson)
focal_class.class_method_signature: AgentServlet.validateCallbackIfGiven(HttpServletRequest pReq)
focal_class.full_signature: private void validateCallbackIfGiven(HttpServletRequest pReq)
focal_class.identifier: validateCallbackIfGiven
focal_class.modifiers: private
focal_class.parameters: (HttpServletRequest pReq)
focal_class.return: void
focal_class.signature: void validateCallbackIfGiven(HttpServletRequest pReq)
focal_class.class_method_signature: AgentServlet.sendStreamingResponse(HttpServletResponse pResp, String pCallback, JSONStreamAware pJson)
focal_class.full_signature: private void sendStreamingResponse(HttpServletResponse pResp, String pCallback, JSONStreamAware pJson)
focal_class.identifier: sendStreamingResponse
focal_class.modifiers: private
focal_class.parameters: (HttpServletResponse pResp, String pCallback, JSONStreamAware pJson)
focal_class.return: void
focal_class.signature: void sendStreamingResponse(HttpServletResponse pResp, String pCallback, JSONStreamAware pJson)
focal_class.class_method_signature: AgentServlet.sendAllJSON(HttpServletResponse pResp, String callback, JSONAware pJson)
focal_class.full_signature: private void sendAllJSON(HttpServletResponse pResp, String callback, JSONAware pJson)
focal_class.identifier: sendAllJSON
focal_class.modifiers: private
focal_class.parameters: (HttpServletResponse pResp, String callback, JSONAware pJson)
focal_class.return: void
focal_class.signature: void sendAllJSON(HttpServletResponse pResp, String callback, JSONAware pJson)
focal_class.class_method_signature: AgentServlet.setNoCacheHeaders(HttpServletResponse pResp)
focal_class.full_signature: private void setNoCacheHeaders(HttpServletResponse pResp)
focal_class.identifier: setNoCacheHeaders
focal_class.modifiers: private
focal_class.parameters: (HttpServletResponse pResp)
focal_class.return: void
focal_class.signature: void setNoCacheHeaders(HttpServletResponse pResp)
focal_class.class_method_signature: AgentServlet.setContentType(HttpServletResponse pResp, String pContentType)
focal_class.full_signature: private void setContentType(HttpServletResponse pResp, String pContentType)
focal_class.identifier: setContentType
focal_class.modifiers: private
focal_class.parameters: (HttpServletResponse pResp, String pContentType)
focal_class.return: void
focal_class.signature: void setContentType(HttpServletResponse pResp, String pContentType)
focal_class.superclass: extends HttpServlet
focal_method.body: @Override
      public void destroy() {
          backendManager.destroy();
          if (discoveryMulticastResponder != null) {
              discoveryMulticastResponder.stop();
              discoveryMulticastResponder = null;
          }
          super.destroy();
      }
focal_method.class_method_signature: AgentServlet.destroy()
focal_method.full_signature: @Override public void destroy()
focal_method.identifier: destroy
focal_method.invocations: destroy stop destroy
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void destroy()