package com.nailabs.abac.process; import edu.stanford.peer.rbtm.credential.Entity; import java.rmi.Remote; import java.rmi.RemoteException; /** * The negotiator interface is responsible for sending and receiving messages. * In this class, the term opponent is used to describe the other negotiatior, * not necessarily the opponent, O, described in the processing algorithms. */ public interface Negotiator extends Remote { /** * Synchronously receive a message which can contain multiple operations * from an opponent and then return the updates to the originating * opponent. */ public abstract Message receive(Message msg) throws Exception, RemoteException; /** * Method to invoke a negotiation. */ public abstract boolean negotiate() throws RemoteException; /** * Accessor method for getting the identity of whose behalf the peer * negotiator is working. */ public abstract Entity getSelf()throws RemoteException; /** * Asynchronous method to transmit a message to the opponent. */ //public abstract void transmit(Message msg); /** * Asynchronous method to receive a method from the opponent. */ //public abstract void receive(Message msg); }