jGCS Documentation

net.sf.jgcs
Interface Service


public interface Service

This class defines a Service. A Service is some functionality that the channel needs to provide to the application. One example is the optimistic total order. If an application creates a channel that provides optimistic total order, the application will receive the message payload with out guarantees and will be notified later about optimistic delivery, regular delivery, uniform delivery, etc. These notifications must implement this interface. All related services must be comparable with each other (e.g. uniform delivery is a stronger service than regular delivery, so if the message is uniform, it's also regular and optimistic -- optimistic lower than regular lower than uniform).

Version:
1.0
Author:
Nuno Carvalho

Method Summary
 int compare(Service service)
          Compares two Services of the same protocol.
 

Method Detail

compare

int compare(Service service)
            throws UnsupportedServiceException
Compares two Services of the same protocol. return 0 if the services are the same, -1 if the service has lower properties than the given service, 1 if the service has greater properties than the given service.

Parameters:
service - the service to compare.
Returns:
0 - same service, 1 greater service, -1 otherwise
Throws:
UnsupportedServiceException - if the service is not comparable.

jGCS Documentation

Copyright (c) 2006, Universidade de Lisboa
For updates and related information please see jGCS home page