public Object invoke(Method method, Object... args) throws Exception { Object value = null; try { preInvokeCapHomeSkeleton(); value = method.invoke(this.servantImpl, fixParamValueType(method, args)); } finally { if (!ContextManager.getContext().response().isAsyncMode()) { postInvokeCapHomeSkeleton(); } } return value; }
public Object invoke(Method method, Object... args) throws Exception { Object value = null; try { preInvokeCapHomeSkeleton(); value = method.invoke(this.servantImpl, fixParamValueType(method, args)); } finally { if (!ContextManager.getContext().response().isAsyncMode()) { postInvokeCapHomeSkeleton(); } } return value; }
public static AsyncContext startAsync() throws IOException { Context<TarsServantRequest, TarsServantResponse> context = ContextManager.getContext(); AsyncContext aContext = new AsyncContext(context); context.response().asyncCallStart(); context.setAttribute(PORTAL_CAP_ASYNC_CONTEXT_ATTRIBUTE, aContext); return aContext; }
public static AsyncContext startAsync() throws IOException { Context<TarsServantRequest, TarsServantResponse> context = ContextManager.getContext(); AsyncContext aContext = new AsyncContext(context); context.response().asyncCallStart(); context.setAttribute(PORTAL_CAP_ASYNC_CONTEXT_ATTRIBUTE, aContext); return aContext; }
public void writeException(Throwable ex) throws IOException { TarsServantResponse response = this.context.response(); response.setRet(TarsHelper.SERVERUNKNOWNERR); response.setCause(ex); response.setResult(null); response.asyncCallEnd(); getCapHomeSkeleton().postInvokeCapHomeSkeleton(); Long startTime = this.context.getAttribute(Context.INTERNAL_START_TIME); TarsServantProcessor.printServiceFlowLog(flowLogger, this.context.request(), response.getRet(), (System.currentTimeMillis() - startTime.longValue()), ex.toString()); }
public void writeException(Throwable ex) throws IOException { TarsServantResponse response = this.context.response(); response.setRet(TarsHelper.SERVERUNKNOWNERR); response.setCause(ex); response.setResult(null); response.asyncCallEnd(); getCapHomeSkeleton().postInvokeCapHomeSkeleton(); Long startTime = this.context.getAttribute(Context.INTERNAL_START_TIME); TarsServantProcessor.printServiceFlowLog(flowLogger, this.context.request(), response.getRet(), (System.currentTimeMillis() - startTime.longValue()), ex.toString()); }
public void writeResult(Object result) throws IOException { TarsServantResponse response = this.context.response(); response.setRet(TarsHelper.SERVERSUCCESS); response.setCause(null); response.setResult(result); response.asyncCallEnd(); getCapHomeSkeleton().postInvokeCapHomeSkeleton(); Long startTime = this.context.getAttribute(Context.INTERNAL_START_TIME); TarsServantProcessor.printServiceFlowLog(flowLogger, this.context.request(), response.getRet(), (System.currentTimeMillis() - startTime.longValue()), ""); } }
public void writeResult(Object result) throws IOException { TarsServantResponse response = this.context.response(); response.setRet(TarsHelper.SERVERSUCCESS); response.setCause(null); response.setResult(result); response.asyncCallEnd(); getCapHomeSkeleton().postInvokeCapHomeSkeleton(); Long startTime = this.context.getAttribute(Context.INTERNAL_START_TIME); TarsServantProcessor.printServiceFlowLog(flowLogger, this.context.request(), response.getRet(), (System.currentTimeMillis() - startTime.longValue()), ""); } }