public Meta outbound(final Object msg, final URI recipientUrl) { if (msg instanceof JSONRequest) { final JSONRequest request = (JSONRequest) msg; addCallback(request, request.getCallback()); } return new Meta(msg); }
/** * Gets the methods. * * @return the methods */ public List<Object> getMethods() { return JSONRpc.describe(getHandle().get(), EVEREQUESTPARAMS, auth); }
/** * Gets the methods. * * @return the methods */ @Access(AccessType.PUBLIC) @Override @JsonIgnore public List<Object> getMethods() { return ((JSONRpcProtocol) protocolStack.getLast()).getMethods(); }
if (INSTANCES.containsKey(id)) { result = INSTANCES.get(id); final Handler<Object> oldHandle = result.getHandle(); oldHandle.update(TYPEUTIL.inject(getHandle())); } else { result = new JSONRpcProtocol(config, TYPEUTIL.inject(getHandle())); final Class<Authorizor> clazz = (Class<Authorizor>) Class .forName(config.getAuthorizor()); result.setAuth(clazz.newInstance()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
@Override public Meta inbound(final Object msg, final URI senderUrl) { final JSONResponse response = invoke(msg, senderUrl); return new Meta(response, response == null, response != null); }
@Override public void delete() { callbacks.clear(); JSONRpcProtocolConfig config = new JSONRpcProtocolConfig(getParams()); JSONRpcProtocolBuilder.delete(config.getId()); }
final JSONMessage jsonMsg = jsonConvert(msg); if (jsonMsg == null) { LOG.log(Level.INFO, "Received non-JSONRPC message:'" + msg + "'");