Tabnine Logo
Configure.getInstance
Code IndexAdd Tabnine to your IDE (free)

How to use
getInstance
method
in
scouter.agent.Configure

Best Java code snippets using scouter.agent.Configure.getInstance (Showing top 20 results out of 315)

origin: scouter-project/scouter

private String getDataSourceType() {
  if (Configure.getInstance().obj_type_inherit_to_child_enabled) {
    return Configure.getInstance().obj_type + "_ds";
  }
  return CounterConstants.DATASOURCE;
}
private void add(String objName, ObjectName mbean, String type, byte decimal, String attrName, String counterName) {
origin: scouter-project/scouter

private void setTarget() {
  Configure conf = Configure.getInstance();
  String host = conf.net_collector_ip;
  int port = conf.net_collector_udp_port;
  try {
    server_host = InetAddress.getByName(host);
    server_port = port;
  } catch (Exception e) {
    e.printStackTrace();
  }
}
protected void close(DatagramSocket d) {
origin: scouter-project/scouter

  public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc classDesc) {
    if (Configure.getInstance()._hook_socket_enabled == false) {
      return cv;
    }
    HookingSet mset = reserved.get(className);
    if (mset != null){			
      return new SocketCV(cv, mset, className);
    }
    return cv;
  }
}
origin: scouter-project/scouter

public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc classDesc) {
  if (Configure.getInstance()._hook_dbconn_enabled == false) {
    return cv;
  }
  if (target.contains(className)) {
    return new InitialContextCV(cv, className);
  }
  return cv;
}
origin: scouter-project/scouter

  @Override
  public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc classDesc) {
    if (Configure.getInstance()._hook_apicall_enabled == false) {
      return cv;
    }

    HookingSet mset = reserved.get(className);
    if (mset != null)
      return new RestTemplateResponseHandlerCV(cv, mset, className);
    return cv;
  }
}
origin: scouter-project/scouter

  public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc classDesc) {
    if (Configure.getInstance()._hook_dbconn_enabled == false) {
      return cv;
    }
    HookingSet mset = reserved.get(className);
    if (mset != null){
      return new JDBCDriverCV(cv, mset, className);
    }

    return cv;
  }
}
origin: scouter-project/scouter

  public static void put(Object ds) {
    String old = ctxSet.put(ds.getClass().getName());
    if (old == null && Configure.getInstance()._log_datasource_lookup_enabled) {
      Logger.println("DataSource lookup : " + ds.getClass().getName());
    }
  }
}
origin: scouter-project/scouter

public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc classDesc) {
  if (Configure.getInstance()._hook_cap_enabled == false) {
    return cv;
  }
  for (int i = 0; i < target.size(); i++) {
    HookingSet mset = target.get(i);
    if (mset.classMatch.include(className)) {
      return new CapReturnCV(cv, mset, className);
    }
  }
  return cv;
}
origin: scouter-project/scouter

  public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc classDesc) {
    if (Configure.getInstance()._hook_dbsql_enabled == false) {
      return cv;
    }
    if (target.contains(className) == false) {
      return cv;
    }
    Logger.println("A108", "jdbc stmt found: " + className);
    return new StatementCV(cv);
  }
}
origin: scouter-project/scouter

  public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc classDesc) {
    if (Configure.getInstance()._hook_dbsql_enabled == false) {
      return cv;
    }
    if (target.contains(className) == false) {
      return cv;
    }
    Logger.println("A106", "jdbc pstmt found: " + className);
    return new PreparedStatementCV(cv, noField);
  }
}
origin: scouter-project/scouter

public void run() {
  while (true) {
    try {
      File root = Configure.getInstance().plugin_dir;
      reloadIfModified(root);
    } catch (Throwable t) {
      Logger.println("A160", t.toString());
    }
    ThreadUtil.sleep(5000);
  }
}
private void reloadIfModified(File root) {
origin: scouter-project/scouter

private static boolean checkOk(String id, int sec) {
  if (Configure.getInstance().isIgnoreLog(id))
    return false;
  if (sec > 0) {
    long last = lastLog.get(id);
    long now = System.currentTimeMillis();
    if (now < last + sec * 1000)
      return false;
    lastLog.put(id, now);
  }
  return true;
}
origin: scouter-project/scouter

@RequestHandler(RequestCmd.SET_CONFIGURE_WAS)
public Pack setAgentConfigure(Pack param) {
  final String setConfig = ((MapPack) param).getText("setConfig");
  boolean success = Configure.getInstance().saveText(setConfig);
  if (success) {
    Configure.getInstance().reload(true);
  }
  MapPack p = new MapPack();
  p.put("result", String.valueOf(success));
  return p;
}

origin: scouter-project/scouter

@RequestHandler(RequestCmd.GET_CONFIGURE_WAS)
public Pack getAgentConfigure(Pack param) {
  MapPack p = new MapPack();
  
  p.put("configKey", Configure.getInstance().getKeyValueInfo().getList("key"));
  
  String config = Configure.getInstance().loadText();
  if (config == null) {
    //config = getEmptyConfiguration();
    config = "";
  }
  p.put("agentConfig", config);
  return p;
}
origin: scouter-project/scouter

@RequestHandler(RequestCmd.GET_CONFIGURE_WAS)
public Pack getAgentConfigure(Pack param) {
  MapPack p = new MapPack();
  
  p.put("configKey", Configure.getInstance().getKeyValueInfo().getList("key"));
  
  String config = Configure.getInstance().loadText();
  if (config == null) {
    //config = getEmptyConfiguration();
    config = "";
  }
  p.put("agentConfig", config);
  return p;
}
origin: scouter-project/scouter

@Counter
public void process(CounterBasket pw) {
  try {
    if (Configure.getInstance().counter_netstat_enabled) {
      netstat();
    }
    domain(pw);
  } catch (Exception e) {
    Logger.println("A140", 10, "HostPerf", e);
  }
}
origin: scouter-project/scouter

@RequestHandler(RequestCmd.CONFIGURE_DESC)
public Pack getConfigureDesc(Pack param) {
  StringKeyLinkedMap<String> descMap = Configure.getInstance().getConfigureDesc();
  MapPack pack = new MapPack();
  Enumeration<StringKeyLinkedEntry<String>> entries = descMap.entries();
  while (entries.hasMoreElements()) {
    StringKeyLinkedEntry<String> entry = entries.nextElement();
    pack.put(entry.getKey(), entry.getValue());
  }
  return pack;
}
origin: scouter-project/scouter

  @RequestHandler(RequestCmd.CONFIGURE_VALUE_TYPE)
  public Pack getConfigureValueType(Pack param) {
    StringKeyLinkedMap<ValueType> valueTypeMap = Configure.getInstance().getConfigureValueType();
    MapPack pack = new MapPack();
    Enumeration<StringKeyLinkedEntry<ValueType>> entries = valueTypeMap.entries();
    while (entries.hasMoreElements()) {
      StringKeyLinkedEntry<ValueType> entry = entries.nextElement();
      pack.put(entry.getKey(), entry.getValue().getType());
    }
    return pack;
  }
}
origin: scouter-project/scouter

  @RequestHandler(RequestCmd.CONFIGURE_VALUE_TYPE)
  public Pack getConfigureValueType(Pack param) {
    StringKeyLinkedMap<ValueType> valueTypeMap = Configure.getInstance().getConfigureValueType();
    MapPack pack = new MapPack();
    Enumeration<StringKeyLinkedEntry<ValueType>> entries = valueTypeMap.entries();
    while (entries.hasMoreElements()) {
      StringKeyLinkedEntry<ValueType> entry = entries.nextElement();
      pack.put(entry.getKey(), entry.getValue().getType());
    }
    return pack;
  }
}
origin: scouter-project/scouter

@RequestHandler(RequestCmd.LIST_CONFIGURE_WAS)
public Pack listConfigure(Pack param) {
  MapValue m = Configure.getInstance().getKeyValueInfo();
  MapPack pack = new MapPack();
  pack.put("key", m.getList("key"));
  pack.put("value", m.getList("value"));
  pack.put("default", m.getList("default"));
  return pack;
}
scouter.agentConfiguregetInstance

Popular methods of Configure

  • <init>
  • apply
  • getBoolean
  • getConfigureDesc
  • getConfigureValueType
  • getInt
  • getKeyValueInfo
  • getLong
  • getObjDetectedType
  • getObjHash
  • getObjName
  • getPropertyFile
  • getObjName,
  • getPropertyFile,
  • getStringSet,
  • getValue,
  • loadText,
  • printConfig,
  • reload,
  • resetObjInfo,
  • saveText

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setScale (BigDecimal)
  • putExtra (Intent)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top plugins for Android Studio
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