*/
@Override
protected <T> RequestBuilder doPrepareRequestBuilder(ResponseReader responseReader, String methodName,
RpcStatsContext statsContext, String requestData, AsyncCallback<T> callback) {
RequestBuilder rb = super.doPrepareRequestBuilder(responseReader, methodName, statsContext, requestData,
callback);
String sessionId = UserSessionManager.getSessionId();
if (sessionId != null) {
if (Log.isDebugEnabled()) {
Log.debug("SessionRpcRequestBuilder is adding sessionId to request for (" + methodName + ")");
}
rb.setHeader(UserSessionManager.SESSION_NAME, sessionId);
} else {
Log.error("SessionRpcRequestBuilder missing sessionId for request (" + methodName + ")");
}
return rb;