public ApiCallStep process(TraceContext ctx, HookArgs hookPoint) { ApiCallStep step = new ApiCallStep(); ctx.apicall_name = hookPoint.class1; return step; }
public ApiCallStep process(TraceContext ctx, HookArgs hookPoint) { ApiCallStep step = new ApiCallStep(); if (hookPoint.args != null && hookPoint.args.length > 0) { ctx.apicall_name = hookPoint.method + "(" + hookPoint.args[0] + ")"; } if (ctx.apicall_name == null) ctx.apicall_name = hookPoint.class1; return step; }
public ApiCallStep process(TraceContext ctx, HookArgs hookPoint) { ApiCallStep step = new ApiCallStep(); if (hookPoint.args != null && hookPoint.args.length > 0) { ctx.apicall_name = hookPoint.method + "(" + hookPoint.args[0] + ")"; } if (ctx.apicall_name == null) ctx.apicall_name = hookPoint.class1; return step; }
public ApiCallStep process(TraceContext ctx, HookArgs hookPoint) { ApiCallStep step = new ApiCallStep(); ctx.apicall_name = hookPoint.class1; return step; }
public ApiCallStep process(TraceContext ctx, HookArgs hookPoint) { ApiCallStep step = new ApiCallStep(); if (hookPoint.args != null && hookPoint.args.length > 0) { ctx.apicall_name = hookPoint.args[0] + "(JCO)"; } if (ctx.apicall_name == null) ctx.apicall_name = hookPoint.class1; return step; }
public ApiCallStep process(TraceContext ctx, HookArgs hookPoint) { ApiCallStep step = new ApiCallStep(); if (hookPoint.args != null && hookPoint.args.length > 0) { ctx.apicall_name = hookPoint.args[0] + "(JCO)"; } if (ctx.apicall_name == null) ctx.apicall_name = hookPoint.class1; return step; }
public ApiCallStep process(TraceContext ctx, HookArgs hookPoint) { ApiCallStep step = new ApiCallStep(); try { if (ok && (hookPoint.this1 instanceof sun.net.www.http.HttpClient)) { URL u = (URL) url.get(hookPoint.this1); if (u != null) { ctx.apicall_name = u.getPath(); } } } catch (Exception e) { ok = false; } if (ctx.apicall_name == null) ctx.apicall_name = hookPoint.class1; return step; }
public ApiCallStep process(TraceContext ctx, HookArgs hookPoint) { ApiCallStep step = new ApiCallStep(); try { if (ok && (hookPoint.this1 instanceof sun.net.www.http.HttpClient)) { URL u = (URL) url.get(hookPoint.this1); if (u != null) { ctx.apicall_name = u.getPath(); } } } catch (Exception e) { ok = false; } if (ctx.apicall_name == null) ctx.apicall_name = hookPoint.class1; return step; }
public ApiCallStep process(TraceContext ctx, HookArgs hookPoint) { if (ok && hookPoint.args != null && hookPoint.args.length == 3) { try { Method method = hookPoint.args[1].getClass().getMethod("getURI"); Object o = method.invoke(hookPoint.args[1]); if (o != null) { ctx.apicall_name = o.toString(); } } catch (Throwable e) { ok = false; } } ApiCallStep step = new ApiCallStep(); if (ctx.apicall_name == null) ctx.apicall_name = hookPoint.class1; return step; }
public ApiCallStep process(TraceContext ctx, HookArgs hookPoint) { if (ok && hookPoint.args != null && hookPoint.args.length == 3) { try { Method method = hookPoint.args[1].getClass().getMethod("getURI"); Object o = method.invoke(hookPoint.args[1]); if (o != null) { ctx.apicall_name = o.toString(); } } catch (Throwable e) { ok = false; } } ApiCallStep step = new ApiCallStep(); if (ctx.apicall_name == null) ctx.apicall_name = hookPoint.class1; return step; }
public static Object startApicall(String name, long apiTxid) { TraceContext ctx = TraceContextManager.getContext(); if (ctx == null) return null; if (ctx.apicall_name != null) { return null; } ApiCallStep step = new ApiCallStep(); step.txid = apiTxid; step.start_time = (int) (System.currentTimeMillis() - ctx.startTime); if (ctx.profile_thread_cputime) { step.start_cpu = (int) (SysJMX.getCurrentThreadCPU() - ctx.startCpu); } ctx.profile.push(step); ctx.apicall_name = name; return new LocalContext(ctx, step); }
public static Object startApicall(String name, long apiTxid) { TraceContext ctx = TraceContextManager.getContext(); if (ctx == null) return null; if (ctx.apicall_name != null) { return null; } ApiCallStep step = new ApiCallStep(); step.txid = apiTxid; step.start_time = (int) (System.currentTimeMillis() - ctx.startTime); if (ctx.profile_thread_cputime) { step.start_cpu = (int) (SysJMX.getCurrentThreadCPU() - ctx.startCpu); } ctx.profile.push(step); ctx.apicall_name = name; return new LocalContext(ctx, step); }
public ApiCallStep process(TraceContext ctx, HookArgs hookPoint) { ApiCallStep step = new ApiCallStep(); if (ok && hookPoint.args != null && hookPoint.args.length >= 1) { try { IHttpClient httpclient = getProxy(hookPoint); step.txid = KeyGen.next(); transfer(httpclient, ctx, hookPoint.args[0], step.txid); step.opt = 1; step.address = null; ctx.apicall_name = httpclient.getURI(hookPoint.args[0]); ctx.apicall_name = fw_stripes(ctx.apicall_name); } catch (Throwable e) { ctx.apicall_name = e.toString(); e.printStackTrace(); ok = false; } } if (ctx.apicall_name == null) ctx.apicall_name = hookPoint.class1; return step; }
public ApiCallStep process(TraceContext ctx, HookArgs hookPoint) { ApiCallStep step = new ApiCallStep(); if (ok && hookPoint.args != null && hookPoint.args.length >= 1) { try { IHttpClient httpclient = getProxy(hookPoint); step.txid = KeyGen.next(); transfer(httpclient, ctx, hookPoint.args[0], step.txid); step.opt = 1; step.address = null; ctx.apicall_name = httpclient.getURI(hookPoint.args[0]); ctx.apicall_name = fw_stripes(ctx.apicall_name); } catch (Throwable e) { ctx.apicall_name = e.toString(); e.printStackTrace(); ok = false; } } if (ctx.apicall_name == null) ctx.apicall_name = hookPoint.class1; return step; }
public ApiCallStep process(TraceContext ctx, HookArgs hookPoint) { ApiCallStep step = new ApiCallStep(); if (fail < 100 && hookPoint.args != null && hookPoint.args.length > 2) { try { IHttpClient httpclient = getProxy(hookPoint); step.txid = KeyGen.next(); transfer(httpclient, ctx, hookPoint.args[1], step.txid); String host = httpclient.getHost(hookPoint.args[0]); step.opt = 1; step.address = host; ctx.apicall_name = httpclient.getURI(hookPoint.args[1]); ctx.apicall_name = fw_stripes(ctx.apicall_name); } catch (Throwable e) { ctx.apicall_name = e.toString(); e.printStackTrace(); fail++; } } if (ctx.apicall_name == null) ctx.apicall_name = hookPoint.class1; return step; }
public ApiCallStep process(TraceContext ctx, HookArgs hookPoint) { ApiCallStep step = new ApiCallStep(); try { if (ok == false) ctx.apicall_name = hookPoint.class1 + "." + hookPoint.method; if (hookPoint.args != null && hookPoint.args.length >= 2) { IHttpClient httpclient = getProxy(hookPoint); step.txid = KeyGen.next(); transfer(httpclient, ctx, hookPoint.args[0], hookPoint.args[1], step.txid); String host = httpclient.getHost(hookPoint.args[0]); step.opt = 1; step.address = host; if (host != null) ctx.apicall_target = host; ctx.apicall_name = httpclient.getURI(hookPoint.args[1]); } } catch (Exception e) { ok = false; ctx.apicall_name = e.toString(); } if (ctx.apicall_name == null) ctx.apicall_name = hookPoint.class1; return step; }
public void forward(WrContext wctx, int uuid) { TraceContext ctx = wctx.inner(); if (ctx.gxid == 0) { ctx.gxid = ctx.txid; } long callee = KeyGen.next(); TransferMap.put(uuid, ctx.gxid, ctx.txid, callee, XLogTypes.APP_SERVICE); ApiCallStep step = new ApiCallStep(); step.txid = callee; step.start_time = (int) (System.currentTimeMillis() - ctx.startTime); if (ctx.profile_thread_cputime) { step.start_cpu = (int) (SysJMX.getCurrentThreadCPU() - ctx.startCpu); } step.hash = DataProxy.sendApicall("local-forward"); ctx.profile.add(step); } public void forwardThread(WrContext wctx, int uuid) {
public void forward(WrContext wctx, int uuid) { TraceContext ctx = wctx.inner(); if (ctx.gxid == 0) { ctx.gxid = ctx.txid; } long callee = KeyGen.next(); TransferMap.put(uuid, ctx.gxid, ctx.txid, callee, XLogTypes.APP_SERVICE); ApiCallStep step = new ApiCallStep(); step.txid = callee; step.start_time = (int) (System.currentTimeMillis() - ctx.startTime); if (ctx.profile_thread_cputime) { step.start_cpu = (int) (SysJMX.getCurrentThreadCPU() - ctx.startCpu); } step.hash = DataProxy.sendApicall("local-forward"); ctx.profile.add(step); } public void forwardThread(WrContext wctx, int uuid) {
public ApiCallStep process(TraceContext ctx, HookArgs hookPoint) { ApiCallStep step = new ApiCallStep(); if (ok) { try { if (hookPoint.args != null && hookPoint.args.length >= 2) { IHttpClient httpclient = getProxy(hookPoint.this1); step.txid = KeyGen.next(); transfer(httpclient, ctx, hookPoint.args[0], hookPoint.args[1], step.txid); String host = httpclient.getHost(hookPoint.args[0]); step.opt = 1; step.address = host; if (host != null) ctx.apicall_target = host; ctx.apicall_name = httpclient.getURI(hookPoint.args[1]); } } catch (Exception e) { this.ok = false; } } if (ctx.apicall_name == null) ctx.apicall_name = hookPoint.class1; return step; }
public ApiCallStep process(TraceContext ctx, HookArgs hookPoint) { ApiCallStep step = new ApiCallStep(); if (ok) { try { if (hookPoint.args != null && hookPoint.args.length >= 2) { IHttpClient httpclient = getProxy(hookPoint.this1); step.txid = KeyGen.next(); transfer(httpclient, ctx, hookPoint.args[0], hookPoint.args[1], step.txid); String host = httpclient.getHost(hookPoint.args[0]); step.opt = 1; step.address = host; if (host != null) ctx.apicall_target = host; ctx.apicall_name = httpclient.getURI(hookPoint.args[1]); } } catch (Exception e) { this.ok = false; } } if (ctx.apicall_name == null) ctx.apicall_name = hookPoint.class1; return step; }