Interface Matcher<T,​Tout>

Type Parameters:
T -
All Known Implementing Classes:
SimpleXmlMatcher

public interface Matcher<T,​Tout>
The Match interface describes the basic features of a matchmaker process that the broker runs to compare negotiating positions and discover a basis for agreement. It is parameterized by the type of the object used o convey the position and basis information. The entry points have a natural sequence to their calls that must be followed or an exception will be raised.
  • Method Summary

    Modifier and Type Method Description
    void close()
    Complete any cleanup operations after the matching operation.
    void compare()
    Compare negotiation statements and find matches.
    Tout getBasis​(int memberNumber)
    Return the basis of agreement from the previous "compare" operation.
    void load​(int memberNumber, java.lang.String memberName, T position)
    Load the negotiation position for one of the members into the match object.
    void open​(int nMembers, boolean inclusive)
    Prepare the matcher object to conduct a match among a match group of nMembers participants.
  • Method Details

    • open

      void open​(int nMembers, boolean inclusive)
      Prepare the matcher object to conduct a match among a match group of nMembers participants. Usually there are two members. Obviously, they both receive any basis for agreement. For three or more members, we need a policy about whether a member receives only matches to which they contributed data or whether every member of the group receives the same basis of agreement regardless of contribution. It is difficult to supply the correct decision for this policy, which is why most match groups will probably have two members for most applications.
      Parameters:
      nMembers -
      inclusive - if there are more than two members, should they all share a match
    • load

      void load​(int memberNumber, java.lang.String memberName, T position) throws ConfigurationError, DocumentError
      Load the negotiation position for one of the members into the match object. Throw exception if the object was not initialized by an open call.
      Parameters:
      memberNumber - sequence number in the group, zero based, e.g. for two members: 0 and 1
      memberName - optional name for the member
      position - the member's negotiation statement for matching
      Throws:
      ConfigurationError
      DocumentError
    • compare

      void compare()
      Compare negotiation statements and find matches. The position for each member must be loaded before this method is called or an exception is thrown.
    • getBasis

      Tout getBasis​(int memberNumber) throws ConfigurationError
      Return the basis of agreement from the previous "compare" operation. An exception is thrown if there was no previous compare operation.
      Returns:
      the basis for agreement with matching statements.
      Throws:
      ConfigurationError
    • close

      void close()
      Complete any cleanup operations after the matching operation.