congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ProcessingParameters
Code IndexAdd Tabnine to your IDE (free)

How to use
ProcessingParameters
in
org.jolokia.config

Best Java code snippets using org.jolokia.config.ProcessingParameters (Showing top 20 results out of 315)

origin: rhuss/jolokia

/**
 * Merge in a configuration and return a ProcessingParameters object representing
 * the merged values
 *
 * @param pConfig config to merge in
 * @return a new ProcessingParameters instance if the given config is not null. Otherwise this object
 *         is returned.
 */
public ProcessingParameters mergedParams(Map<String, String> pConfig) {
  if (pConfig == null) {
    return this;
  } else {
    Map<ConfigKey,String> newParams = new HashMap<ConfigKey, String>();
    newParams.putAll(params);
    newParams.putAll(convertToConfigMap(pConfig));
    return new ProcessingParameters(newParams, pathInfo);
  }
}
origin: rhuss/jolokia

/**
 * Get a processing configuration or null if not set
 * @param pConfigKey configuration key to fetch
 * @return string value or <code>null</code> if not set
 */
public String getParameter(ConfigKey pConfigKey) {
  return processingConfig.get(pConfigKey);
}
origin: rhuss/jolokia

private static String extractPathInfo(String pPathInfo, ProcessingParameters pProcessingParams) {
  String pathInfo = pPathInfo;
  // If no pathinfo is given directly, we look for a query parameter named 'p'.
  // This variant is helpful, if there are problems with the server mangling
  // up the pathinfo (e.g. for security concerns, often '/','\',';' and other are not
  // allowed in encoded form within the pathinfo)
  if (pProcessingParams != null && (pPathInfo == null || pPathInfo.length() == 0 || pathInfo.matches("^/+$"))) {
    pathInfo = pProcessingParams.getPathInfo();
  }
  return normalizePathInfo(pathInfo);
}
origin: rhuss/jolokia

/**
 * Create a single {@link JmxRequest}s from a JSON map representation of a request
 *
 * @param pRequestMap JSON representation of a {@link JmxRequest}
 * @param pProcessingParams additional map of operational parameters. Must not be null.
 * @return the created {@link JmxRequest}
 */
public static <R extends JmxRequest> R createPostRequest(Map<String, ?> pRequestMap, ProcessingParameters pProcessingParams) {
  try {
    ProcessingParameters paramsMerged = pProcessingParams.mergedParams((Map<String,String>) pRequestMap.get("config"));
    RequestType type = RequestType.getTypeByName((String) pRequestMap.get("type"));
    return (R) getCreator(type).create(pRequestMap, paramsMerged);
  } catch (MalformedObjectNameException e) {
    throw new IllegalArgumentException("Invalid object name. " + e.getMessage(),e);
  }
}
origin: org.jolokia/jolokia-core

/**
 * Create a single {@link JmxRequest}s from a JSON map representation of a request
 *
 * @param pRequestMap JSON representation of a {@link JmxRequest}
 * @param pProcessingParams additional map of operational parameters. Must not be null.
 * @return the created {@link JmxRequest}
 */
public static <R extends JmxRequest> R createPostRequest(Map<String, ?> pRequestMap, ProcessingParameters pProcessingParams) {
  try {
    ProcessingParameters paramsMerged = pProcessingParams.mergedParams((Map<String,String>) pRequestMap.get("config"));
    RequestType type = RequestType.getTypeByName((String) pRequestMap.get("type"));
    return (R) getCreator(type).create(pRequestMap, paramsMerged);
  } catch (MalformedObjectNameException e) {
    throw new IllegalArgumentException("Invalid object name. " + e.getMessage(),e);
  }
}
origin: rhuss/jolokia

/**
 * Get processing parameters from a string-string map
 *
 * @param pParams params to extra. A parameter "p" is used as extra path info
 * @return the processing parameters
 */
public ProcessingParameters getProcessingParameters(Map<String,String> pParams) {
  Map<ConfigKey,String> procParams = ProcessingParameters.convertToConfigMap(pParams);
  for (Map.Entry<ConfigKey,String> entry : globalConfig.entrySet()) {
    ConfigKey key = entry.getKey();
    if (key.isRequestConfig() && !procParams.containsKey(key)) {
      procParams.put(key,entry.getValue());
    }
  }
  return new ProcessingParameters(procParams,pParams.get(PATH_QUERY_PARAM));
}
origin: rhuss/jolokia

private void initParameters(ProcessingParameters pParams) {
  processingConfig = pParams;
  String ignoreErrors = processingConfig.get(ConfigKey.IGNORE_ERRORS);
  if (ignoreErrors != null && ignoreErrors.matches("^(true|yes|on|1)$")) {
    valueFaultHandler = ValueFaultHandler.IGNORING_VALUE_FAULT_HANDLER;
  } else {
    valueFaultHandler = ValueFaultHandler.THROWING_VALUE_FAULT_HANDLER;
  }
}
origin: org.jolokia/jolokia-core

private static String extractPathInfo(String pPathInfo, ProcessingParameters pProcessingParams) {
  String pathInfo = pPathInfo;
  // If no pathinfo is given directly, we look for a query parameter named 'p'.
  // This variant is helpful, if there are problems with the server mangling
  // up the pathinfo (e.g. for security concerns, often '/','\',';' and other are not
  // allowed in encoded form within the pathinfo)
  if (pProcessingParams != null && (pPathInfo == null || pPathInfo.length() == 0 || pathInfo.matches("^/+$"))) {
    pathInfo = pProcessingParams.getPathInfo();
  }
  return normalizePathInfo(pathInfo);
}
origin: org.jolokia/jolokia-osgi

/**
 * Create a single {@link JmxRequest}s from a JSON map representation of a request
 *
 * @param pRequestMap JSON representation of a {@link JmxRequest}
 * @param pProcessingParams additional map of operational parameters. Must not be null.
 * @return the created {@link JmxRequest}
 */
public static <R extends JmxRequest> R createPostRequest(Map<String, ?> pRequestMap, ProcessingParameters pProcessingParams) {
  try {
    ProcessingParameters paramsMerged = pProcessingParams.mergedParams((Map<String,String>) pRequestMap.get("config"));
    RequestType type = RequestType.getTypeByName((String) pRequestMap.get("type"));
    return (R) getCreator(type).create(pRequestMap, paramsMerged);
  } catch (MalformedObjectNameException e) {
    throw new IllegalArgumentException("Invalid object name. " + e.getMessage(),e);
  }
}
origin: org.jolokia/jolokia-core

/**
 * Merge in a configuration and return a ProcessingParameters object representing
 * the merged values
 *
 * @param pConfig config to merge in
 * @return a new ProcessingParameters instance if the given config is not null. Otherwise this object
 *         is returned.
 */
public ProcessingParameters mergedParams(Map<String, String> pConfig) {
  if (pConfig == null) {
    return this;
  } else {
    Map<ConfigKey,String> newParams = new HashMap<ConfigKey, String>();
    newParams.putAll(params);
    newParams.putAll(convertToConfigMap(pConfig));
    return new ProcessingParameters(newParams, pathInfo);
  }
}
origin: rhuss/jolokia

/**
 * Get a processing configuration as integer or null
 * if not set
 *
 * @param pConfigKey configuration to lookup
 * @return integer value of configuration or 0 if not set.
 */
public int getParameterAsInt(ConfigKey pConfigKey) {
  String intValueS = processingConfig.get(pConfigKey);
  if (intValueS != null) {
    return Integer.parseInt(intValueS);
  } else {
    return 0;
  }
}
origin: org.jolokia/jolokia-osgi

private static String extractPathInfo(String pPathInfo, ProcessingParameters pProcessingParams) {
  String pathInfo = pPathInfo;
  // If no pathinfo is given directly, we look for a query parameter named 'p'.
  // This variant is helpful, if there are problems with the server mangling
  // up the pathinfo (e.g. for security concerns, often '/','\',';' and other are not
  // allowed in encoded form within the pathinfo)
  if (pProcessingParams != null && (pPathInfo == null || pPathInfo.length() == 0 || pathInfo.matches("^/+$"))) {
    pathInfo = pProcessingParams.getPathInfo();
  }
  return normalizePathInfo(pathInfo);
}
origin: org.jolokia/jolokia-osgi

/**
 * Merge in a configuration and return a ProcessingParameters object representing
 * the merged values
 *
 * @param pConfig config to merge in
 * @return a new ProcessingParameters instance if the given config is not null. Otherwise this object
 *         is returned.
 */
public ProcessingParameters mergedParams(Map<String, String> pConfig) {
  if (pConfig == null) {
    return this;
  } else {
    Map<ConfigKey,String> newParams = new HashMap<ConfigKey, String>();
    newParams.putAll(params);
    newParams.putAll(convertToConfigMap(pConfig));
    return new ProcessingParameters(newParams, pathInfo);
  }
}
origin: org.jolokia/jolokia-osgi

/**
 * Get a processing configuration or null if not set
 * @param pConfigKey configuration key to fetch
 * @return string value or <code>null</code> if not set
 */
public String getParameter(ConfigKey pConfigKey) {
  return processingConfig.get(pConfigKey);
}
origin: org.jolokia/jolokia-core

/**
 * Get processing parameters from a string-string map
 *
 * @param pParams params to extra. A parameter "p" is used as extra path info
 * @return the processing parameters
 */
public ProcessingParameters getProcessingParameters(Map<String,String> pParams) {
  Map<ConfigKey,String> procParams = ProcessingParameters.convertToConfigMap(pParams);
  for (Map.Entry<ConfigKey,String> entry : globalConfig.entrySet()) {
    ConfigKey key = entry.getKey();
    if (key.isRequestConfig() && !procParams.containsKey(key)) {
      procParams.put(key,entry.getValue());
    }
  }
  return new ProcessingParameters(procParams,pParams.get(PATH_QUERY_PARAM));
}
origin: org.jolokia/jolokia-core

/**
 * Get a processing configuration or null if not set
 * @param pConfigKey configuration key to fetch
 * @return string value or <code>null</code> if not set
 */
public String getParameter(ConfigKey pConfigKey) {
  return processingConfig.get(pConfigKey);
}
origin: org.jolokia/jolokia-osgi

/**
 * Get processing parameters from a string-string map
 *
 * @param pParams params to extra. A parameter "p" is used as extra path info
 * @return the processing parameters
 */
public ProcessingParameters getProcessingParameters(Map<String,String> pParams) {
  Map<ConfigKey,String> procParams = ProcessingParameters.convertToConfigMap(pParams);
  for (Map.Entry<ConfigKey,String> entry : globalConfig.entrySet()) {
    ConfigKey key = entry.getKey();
    if (key.isRequestConfig() && !procParams.containsKey(key)) {
      procParams.put(key,entry.getValue());
    }
  }
  return new ProcessingParameters(procParams,pParams.get(PATH_QUERY_PARAM));
}
origin: org.jolokia/jolokia-osgi

private void initParameters(ProcessingParameters pParams) {
  processingConfig = pParams;
  String ignoreErrors = processingConfig.get(ConfigKey.IGNORE_ERRORS);
  if (ignoreErrors != null && ignoreErrors.matches("^(true|yes|on|1)$")) {
    valueFaultHandler = ValueFaultHandler.IGNORING_VALUE_FAULT_HANDLER;
  } else {
    valueFaultHandler = ValueFaultHandler.THROWING_VALUE_FAULT_HANDLER;
  }
}
origin: org.jolokia/jolokia-core

private void initParameters(ProcessingParameters pParams) {
  processingConfig = pParams;
  String ignoreErrors = processingConfig.get(ConfigKey.IGNORE_ERRORS);
  if (ignoreErrors != null && ignoreErrors.matches("^(true|yes|on|1)$")) {
    valueFaultHandler = ValueFaultHandler.IGNORING_VALUE_FAULT_HANDLER;
  } else {
    valueFaultHandler = ValueFaultHandler.THROWING_VALUE_FAULT_HANDLER;
  }
}
origin: org.jolokia/jolokia-core

/**
 * Get a processing configuration as integer or null
 * if not set
 *
 * @param pConfigKey configuration to lookup
 * @return integer value of configuration or 0 if not set.
 */
public int getParameterAsInt(ConfigKey pConfigKey) {
  String intValueS = processingConfig.get(pConfigKey);
  if (intValueS != null) {
    return Integer.parseInt(intValueS);
  } else {
    return 0;
  }
}
org.jolokia.configProcessingParameters

Javadoc

Class encapsulating parameters used during processing

Most used methods

  • <init>
    Constructor which is already filtered and splitted
  • convertToConfigMap
  • get
    Get a processing parameter
  • getPathInfo
    Get the path info represented with this processing parameters or null if no path info is given
  • mergedParams
    Merge in a configuration and return a ProcessingParameters object representing the merged values

Popular in Java

  • Reactive rest calls using spring rest template
  • getContentResolver (Context)
  • getResourceAsStream (ClassLoader)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now