Codota Logo
Configuration.getAsBoolean
Code IndexAdd Codota to your IDE (free)

How to use
getAsBoolean
method
in
org.jolokia.config.Configuration

Best Java code snippets using org.jolokia.config.Configuration.getAsBoolean (Showing top 15 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: rhuss/jolokia

private String getHostName(InetSocketAddress address) {
  return configuration.getAsBoolean(ConfigKey.ALLOW_DNS_REVERSE_LOOKUP) ? address.getHostName() : null;
}
origin: rhuss/jolokia

private boolean listenForDiscoveryMcRequests(Configuration pConfig) {
  // Check for system props, system env and agent config
  boolean sysProp = System.getProperty("jolokia." + ConfigKey.DISCOVERY_ENABLED.getKeyValue()) != null;
  boolean env     = System.getenv("JOLOKIA_DISCOVERY") != null;
  boolean config  = pConfig.getAsBoolean(ConfigKey.DISCOVERY_ENABLED);
  return sysProp || env || config;
}
/**
origin: rhuss/jolokia

private void addErrorInfo(JSONObject pErrorResp, Throwable pExp, JmxRequest pJmxReq) {
  if (config.getAsBoolean(ConfigKey.ALLOW_ERROR_DETAILS)) {
    String includeStackTrace = pJmxReq != null ?
        pJmxReq.getParameter(ConfigKey.INCLUDE_STACKTRACE) : "true";
    if (includeStackTrace.equalsIgnoreCase("true") ||
      (includeStackTrace.equalsIgnoreCase("runtime") && pExp instanceof RuntimeException)) {
      StringWriter writer = new StringWriter();
      pExp.printStackTrace(new PrintWriter(writer));
      pErrorResp.put("stacktrace", writer.toString());
    }
    if (pJmxReq != null && pJmxReq.getParameterAsBool(ConfigKey.SERIALIZE_EXCEPTION)) {
      pErrorResp.put("error_value", backendManager.convertExceptionToJson(pExp, pJmxReq));
    }
  }
}
origin: rhuss/jolokia

private void sendResponse(HttpExchange pExchange, ParsedUri pParsedUri, JSONAware pJson) throws IOException {
  boolean streaming = configuration.getAsBoolean(ConfigKey.STREAMING);
  if (streaming) {
    JSONStreamAware jsonStream = (JSONStreamAware)pJson;
    sendStreamingResponse(pExchange, pParsedUri, jsonStream);
  } else {
    // Fallback, send as one object
    // TODO: Remove for 2.0
    sendAllJSON(pExchange, pParsedUri, pJson);
  }
}
origin: rhuss/jolokia

                        jolokiaConfig.get(ConfigKey.AUTH_URL),
                        jolokiaConfig.get(ConfigKey.AUTH_PRINCIPAL_SPEC),
                        jolokiaConfig.getAsBoolean(ConfigKey.AUTH_IGNORE_CERTS)));
} else {
  throw new IllegalArgumentException("No auth method '" + authMode + "' known. " +
origin: rhuss/jolokia

allowDnsReverseLookup = config.getAsBoolean(ConfigKey.ALLOW_DNS_REVERSE_LOOKUP);
streamingEnabled = config.getAsBoolean(ConfigKey.STREAMING);
origin: rhuss/jolokia

private void initMBeans(Configuration pConfig) {
  int maxEntries = pConfig.getAsInt(HISTORY_MAX_ENTRIES);
  int maxDebugEntries = pConfig.getAsInt(DEBUG_MAX_ENTRIES);
  historyStore = new HistoryStore(maxEntries);
  debugStore = new DebugStore(maxDebugEntries, pConfig.getAsBoolean(DEBUG));
  try {
    localDispatcher.initMBeans(historyStore, debugStore);
  } catch (NotCompliantMBeanException e) {
    intError("Error registering config MBean: " + e, e);
  } catch (MBeanRegistrationException e) {
    intError("Cannot register MBean: " + e, e);
  } catch (MalformedObjectNameException e) {
    intError("Invalid name for config MBean: " + e, e);
  }
}
origin: org.jolokia/jolokia-osgi

private boolean listenForDiscoveryMcRequests(Configuration pConfig) {
  // Check for system props, system env and agent config
  boolean sysProp = System.getProperty("jolokia." + ConfigKey.DISCOVERY_ENABLED.getKeyValue()) != null;
  boolean env     = System.getenv("JOLOKIA_DISCOVERY") != null;
  boolean config  = pConfig.getAsBoolean(ConfigKey.DISCOVERY_ENABLED);
  return sysProp || env || config;
}
/**
origin: org.jolokia/jolokia-core

private boolean listenForDiscoveryMcRequests(Configuration pConfig) {
  // Check for system props, system env and agent config
  boolean sysProp = System.getProperty("jolokia." + ConfigKey.DISCOVERY_ENABLED.getKeyValue()) != null;
  boolean env     = System.getenv("JOLOKIA_DISCOVERY") != null;
  boolean config  = pConfig.getAsBoolean(ConfigKey.DISCOVERY_ENABLED);
  return sysProp || env || config;
}
/**
origin: org.jolokia/jolokia-core

private void addErrorInfo(JSONObject pErrorResp, Throwable pExp, JmxRequest pJmxReq) {
  if (config.getAsBoolean(ConfigKey.ALLOW_ERROR_DETAILS)) {
    String includeStackTrace = pJmxReq != null ?
        pJmxReq.getParameter(ConfigKey.INCLUDE_STACKTRACE) : "true";
    if (includeStackTrace.equalsIgnoreCase("true") ||
      (includeStackTrace.equalsIgnoreCase("runtime") && pExp instanceof RuntimeException)) {
      StringWriter writer = new StringWriter();
      pExp.printStackTrace(new PrintWriter(writer));
      pErrorResp.put("stacktrace", writer.toString());
    }
    if (pJmxReq != null && pJmxReq.getParameterAsBool(ConfigKey.SERIALIZE_EXCEPTION)) {
      pErrorResp.put("error_value", backendManager.convertExceptionToJson(pExp, pJmxReq));
    }
  }
}
origin: org.jolokia/jolokia-osgi

private void addErrorInfo(JSONObject pErrorResp, Throwable pExp, JmxRequest pJmxReq) {
  if (config.getAsBoolean(ConfigKey.ALLOW_ERROR_DETAILS)) {
    String includeStackTrace = pJmxReq != null ?
        pJmxReq.getParameter(ConfigKey.INCLUDE_STACKTRACE) : "true";
    if (includeStackTrace.equalsIgnoreCase("true") ||
      (includeStackTrace.equalsIgnoreCase("runtime") && pExp instanceof RuntimeException)) {
      StringWriter writer = new StringWriter();
      pExp.printStackTrace(new PrintWriter(writer));
      pErrorResp.put("stacktrace", writer.toString());
    }
    if (pJmxReq != null && pJmxReq.getParameterAsBool(ConfigKey.SERIALIZE_EXCEPTION)) {
      pErrorResp.put("error_value", backendManager.convertExceptionToJson(pExp, pJmxReq));
    }
  }
}
origin: org.jolokia/jolokia-core

allowDnsReverseLookup = config.getAsBoolean(ConfigKey.ALLOW_DNS_REVERSE_LOOKUP);
streamingEnabled = config.getAsBoolean(ConfigKey.STREAMING);
origin: org.jolokia/jolokia-osgi

allowDnsReverseLookup = config.getAsBoolean(ConfigKey.ALLOW_DNS_REVERSE_LOOKUP);
streamingEnabled = config.getAsBoolean(ConfigKey.STREAMING);
origin: org.jolokia/jolokia-core

private void initMBeans(Configuration pConfig) {
  int maxEntries = pConfig.getAsInt(HISTORY_MAX_ENTRIES);
  int maxDebugEntries = pConfig.getAsInt(DEBUG_MAX_ENTRIES);
  historyStore = new HistoryStore(maxEntries);
  debugStore = new DebugStore(maxDebugEntries, pConfig.getAsBoolean(DEBUG));
  try {
    localDispatcher.initMBeans(historyStore, debugStore);
  } catch (NotCompliantMBeanException e) {
    intError("Error registering config MBean: " + e, e);
  } catch (MBeanRegistrationException e) {
    intError("Cannot register MBean: " + e, e);
  } catch (MalformedObjectNameException e) {
    intError("Invalid name for config MBean: " + e, e);
  }
}
origin: org.jolokia/jolokia-osgi

private void initMBeans(Configuration pConfig) {
  int maxEntries = pConfig.getAsInt(HISTORY_MAX_ENTRIES);
  int maxDebugEntries = pConfig.getAsInt(DEBUG_MAX_ENTRIES);
  historyStore = new HistoryStore(maxEntries);
  debugStore = new DebugStore(maxDebugEntries, pConfig.getAsBoolean(DEBUG));
  try {
    localDispatcher.initMBeans(historyStore, debugStore);
  } catch (NotCompliantMBeanException e) {
    intError("Error registering config MBean: " + e, e);
  } catch (MBeanRegistrationException e) {
    intError("Cannot register MBean: " + e, e);
  } catch (MalformedObjectNameException e) {
    intError("Invalid name for config MBean: " + e, e);
  }
}
org.jolokia.configConfigurationgetAsBoolean

Javadoc

Get an configuration value as boolean value. The value must be configured as 'true' for this method to return true

Popular methods of Configuration

  • get
    Get a configuration value if set as configuration or the default value if not
  • <init>
    Convenience constructor for setting up base configuration with key values pairs. This constructor is
  • getProcessingParameters
    Get processing parameters from a string-string map
  • updateGlobalConfiguration
    Update the configuration hold by this object
  • getAsInt
    Get an configuration value as int value

Popular in Java

  • Updating database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • findViewById (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now