@Override public F.Promise<SimpleResult> call(Context ctx) throws Throwable { if (Logger.isTraceEnabled()) Logger.trace("Method Start"); Context.current.set(ctx); if (Logger.isDebugEnabled()) Logger.debug("AnonymousLogin for resource " + Context.current().request()); String user = BBConfiguration.getBaasBoxUsername(); String password = BBConfiguration.getBaasBoxPassword(); // retrieve AppCode String appCode = RequestHeaderHelper.getAppCode(ctx); ctx.args.put("username", user); ctx.args.put("password", password); ctx.args.put("appcode", appCode); if (Logger.isDebugEnabled()) Logger.debug("username (defined in conf file): " + user); if (Logger.isDebugEnabled()) Logger.debug("password (defined in conf file): " + password); if (Logger.isDebugEnabled()) Logger.debug("appcode (from header or querystring): " + appCode); if (Logger.isDebugEnabled()) Logger.debug("token: N/A"); // executes the request F.Promise<SimpleResult> tempResult = delegate.call(ctx); WrapResponse wr = new WrapResponse(); // SimpleResult result=wr.wrap(ctx, tempResult); F.Promise<SimpleResult> result = wr.wrapAsync(ctx, tempResult); if (Logger.isTraceEnabled()) Logger.trace("Method End"); return result; }