com.almende.eve.transport
Interface TransportService

All Known Implementing Classes:
HttpService, XmppService

public interface TransportService


Method Summary
 String getAgentId(String agentUrl)
          Get the id of an agent from its url.
 String getAgentUrl(String agentId)
          Get the url of an agent from its id.
 List<String> getProtocols()
          Get the protocols supported by this service
 JSONResponse send(String senderId, String receiver, JSONRequest request)
          Send a message to an other agent
 void sendAsync(String senderId, String receiver, JSONRequest request, AsyncCallback<JSONResponse> callback)
          Asynchronously Send a message to an other agent
 

Method Detail

getAgentUrl

String getAgentUrl(String agentId)
Get the url of an agent from its id.

Parameters:
agentId -
Returns:
agentUrl

getAgentId

String getAgentId(String agentUrl)
Get the id of an agent from its url. If the id cannot be extracted, null is returned.

Parameters:
agentUrl -
Returns:
agentId

send

JSONResponse send(String senderId,
                  String receiver,
                  JSONRequest request)
                  throws Exception
Send a message to an other agent

Parameters:
senderId -
request -
Throws:
Exception

sendAsync

void sendAsync(String senderId,
               String receiver,
               JSONRequest request,
               AsyncCallback<JSONResponse> callback)
               throws Exception
Asynchronously Send a message to an other agent

Parameters:
senderId -
request -
callback - with a JSONResponse
Throws:
Exception

getProtocols

List<String> getProtocols()
Get the protocols supported by this service

Returns:
protocols


Copyright © 2013 Almende BV. All Rights Reserved.