Package com.almende.eve.transport

Examples of com.almende.eve.transport.TransportService


                      + " must implement "
                      + TransportService.class.getName());
            }
           
            // initialize the transport service
            final TransportService transport = (TransportService) transportClass
                .getConstructor(AgentHost.class, Map.class)
                .newInstance(this, transportParams);
           
            // register the service with the agent factory
            addTransportService(transport);
View Full Code Here


      requestParams.put(Sender.class, null);
      JSONResponse response = invoke(agentId, request, requestParams);
      return response;
    }
    else {
      TransportService service = null;
      String protocol = null;
      int separator = receiverUrl.indexOf(":");
      if (separator != -1) {
        protocol = receiverUrl.substring(0, separator);
        service = getTransportService(protocol);
      }
      if (service != null) {
        JSONResponse response = service.send(senderId, receiverUrl, request);
        return response;
      }
      else {
        throw new ProtocolException(
          "No transport service configured for protocol '" + protocol + "'.");
View Full Code Here

          }
        }
      }).start();
    }
    else {
      TransportService service = null;
      String protocol = null;
      int separator = receiverUrl.indexOf(":");
      if (separator != -1) {
        protocol = receiverUrl.substring(0, separator);
        service = getTransportService(protocol);
      }
      if (service != null) {
        service.sendAsync(senderId, receiverUrl, request, callback);
      }
      else {
        throw new ProtocolException(
          "No transport service configured for protocol '" + protocol + "'.");
      }
View Full Code Here

                "TransportService class " + transportClass.getName() +
                " must implement " + TransportService.class.getName());
          }
         
          // initialize the transport service
          TransportService transport = (TransportService) transportClass
              .getConstructor(AgentFactory.class, Map.class)
              .newInstance(this, transportParams);

          // register the service with the agent factory
          addTransportService(transport);
View Full Code Here

       
        // TODO: getting an arbitrary http service which knows this agent
        //       is not safe
        //       -> Scheduler should be configured with the servlet_url
        //          that it should use specified?
        TransportService service = null;
        for (TransportService s : host.getTransportServices("http")) {
          if (s.getAgentUrl(agentId) != null) {
            service = s;
            break;
          }
        }
        URI url = null;
        if (service != null) {
          url = service.getAgentUrl(agentId);
        }
        String path = "";
        if (url != null){
          URL uri = url.toURL();
          path = uri.getPath();
View Full Code Here

TOP

Related Classes of com.almende.eve.transport.TransportService

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.