toolbox.services.socket.simple
Interface SimpleSocketService

Package class diagram package SimpleSocketService
All Known Implementing Classes:
SimpleSocketServiceImpl

public interface SimpleSocketService

Interface that defines a simple client socket API.


Method Summary
 void publish(SocketMessage message)
          Perform a 1-way asynhronous fire and forget operation.
 SocketMessage request(SocketMessage message)
          Perform a 2-way synchronous request/reply operation.
 

Method Detail

request

SocketMessage request(SocketMessage message)
                      throws SimpleSocketException
Perform a 2-way synchronous request/reply operation.

Parameters:
message - SocketMessage instance containing the request data.
Returns:
SocketMessage instance with the reply data.
Throws:
SimpleSocketException - if an error occurs during socket communication.

publish

void publish(SocketMessage message)
             throws SimpleSocketException
Perform a 1-way asynhronous fire and forget operation. At the lowest level of interaction this method silently ignores any response from the client socket. However, this class returns an empty response if the sokcet communication succeeded and throws an exception if a socket connectiviy problem occurred.

Parameters:
message - SocketMessage instance containing the publish data.
Throws:
SimpleSocketException - if the publish action could not be performed.