Package com.almende.eve.rpc.jsonrpc

Examples of com.almende.eve.rpc.jsonrpc.JSONRPCException


            try {
              final T res = (T) TypeUtil.inject(
                  response.getResult(), type);
              callback.onSuccess(res);
            } catch (final ClassCastException cce) {
              callback.onFailure(new JSONRPCException(
                  "Incorrect return type received for JSON-RPC call:"
                      + request.getMethod() + "@" + url,
                  cce));
            }
           
View Full Code Here


      }
    } catch (final Exception e) {
      LOG.log(Level.WARNING, "Exception in receiving message", e);
      // generate JSON error response, skipped if it was an incoming
      // notification i.s.o. request.
      final JSONRPCException jsonError = new JSONRPCException(
          JSONRPCException.CODE.INTERNAL_ERROR, e.getMessage(), e);
      final JSONResponse response = new JSONResponse(jsonError);
      response.setId(id);
      signalAgent(new AgentSignal<JSONResponse>(AgentSignal.EXCEPTION,
          response));
View Full Code Here

        // invoke the agent
        host.receive(agentId, body, new URI(from.getId()), null);
       
      } catch (Exception err) {
        // generate JSON error response
        JSONRPCException jsonError = new JSONRPCException(
            JSONRPCException.CODE.INTERNAL_ERROR, err.getMessage());
        JSONResponse response = new JSONResponse(jsonError);
       
        // send exception as response
        Message msg = new MessageBuilder().withRecipientJids(from)
View Full Code Here

TOP

Related Classes of com.almende.eve.rpc.jsonrpc.JSONRPCException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.