@SuppressWarnings("unchecked") public <T> T getAttribute(String name) { return (T) getAttribute(name, null); }
@SuppressWarnings("unchecked") public <T> T getAttribute(String name) { return (T) getAttribute(name, null); }
public <T> T getAttribute(String name, T defaultValue) { return (T) this.context.getAttribute(name, defaultValue); }
@SuppressWarnings("unchecked") public <T> T getAttribute(String name) { return (T) this.context.getAttribute(name); }
@SuppressWarnings("unchecked") public <T> T getAttribute(String name) { return (T) this.context.getAttribute(name); }
public <T> T getAttribute(String name, T defaultValue) { return (T) this.context.getAttribute(name, defaultValue); }
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()), ""); } }
try { Context<TarsServantRequest, TarsServantResponse> context = ContextManager.getContext(); AsyncContext aContext = context.getAttribute(AsyncContext.PORTAL_CAP_ASYNC_CONTEXT_ATTRIBUTE); if (aContext != null) aContext.writeException(cause); } catch (Exception ex) {
try { Context<TarsServantRequest, TarsServantResponse> context = ContextManager.getContext(); AsyncContext aContext = context.getAttribute(AsyncContext.PORTAL_CAP_ASYNC_CONTEXT_ATTRIBUTE); if (aContext != null) aContext.writeException(cause); } catch (Exception ex) {