com.almende.eve.protocol.jsonrpc.JSONRpcProtocol Maven / Gradle / Ivy
/*
* Copyright: Almende B.V. (2014), Rotterdam, The Netherlands
* License: The Apache Software License, Version 2.0
*/
package com.almende.eve.protocol.jsonrpc;
import java.net.URI;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.almende.eve.capabilities.handler.Handler;
import com.almende.eve.protocol.Protocol;
import com.almende.eve.protocol.auth.Authorizor;
import com.almende.eve.protocol.auth.DefaultAuthorizor;
import com.almende.eve.protocol.jsonrpc.annotation.Sender;
import com.almende.eve.protocol.jsonrpc.formats.JSONMessage;
import com.almende.eve.protocol.jsonrpc.formats.JSONRPCException;
import com.almende.eve.protocol.jsonrpc.formats.JSONRequest;
import com.almende.eve.protocol.jsonrpc.formats.JSONResponse;
import com.almende.eve.protocol.jsonrpc.formats.RequestParams;
import com.almende.util.callback.AsyncCallback;
import com.almende.util.callback.AsyncCallbackQueue;
import com.almende.util.jackson.JOM;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
/**
* The Class JSONRpcProtocol.
*/
public class JSONRpcProtocol implements Protocol {
private static final Logger LOG = Logger.getLogger(JSONRpcProtocol.class
.getName());
private static final RequestParams EVEREQUESTPARAMS = new RequestParams();
static {
EVEREQUESTPARAMS.put(Sender.class, null);
}
private Authorizor auth = new DefaultAuthorizor();
private final AsyncCallbackQueue callbacks = new AsyncCallbackQueue();
private final Handler
© 2015 - 2025 Weber Informatics LLC | Privacy Policy