Jadex 0.96-beta1

jadex.planlib
Class NegotiationRecord

java.lang.Object
  extended by jadex.planlib.NegotiationRecord

public class NegotiationRecord
extends Object

The negotiation record has the purpose to store all information about one negotiation round in an iterated contract net protocol.


Field Summary
static String FAILED
          The negotiation is finished with a failure.
static String OPEN
          The negotiation is not yet finished.
static String SUCCEEDED
          The negotiation has finished successfully.
 
Constructor Summary
NegotiationRecord(Object cfp)
          Create a new negotiation record.
 
Method Summary
 void addExecutedTask(Object task)
          Add an executed task.
 void addProposal(IMessageEvent msg)
          Add a proposal (and the message).
 Object[] getAcceptableProposals()
          Get the acceptable proposals.
 AgentIdentifier getAgentIdentifier(Object proposal)
          Get the sender of a proposal.
 Object getCFP()
          Get the call for proposal.
 long getEndtime()
          Get the end time.
 IMessageEvent getMessageEvent(Object proposal)
          Get the message event for a proposal.
 Object[] getNonAcceptableProposals()
          Get the non-acceptable proposals.
 Object[] getNonWinnerProposals()
          Get the non-winner proposals.
 Object getProposal(AgentIdentifier sender)
          Get the proposal for the sender.
 Object[] getProposals()
          Get all proposals.
 long getStarttime()
          Get the start time.
 String getState()
          Get the negotiation state.
 Object[] getTasks()
          Get the executed tasks.
 AgentIdentifier[] getWinnerParticipants()
          Get the winner participants.
 Object[] getWinnerProposals()
          Get the winner proposals.
 void setAcceptableProposals(Object[] proposals)
          Set the acceptable proposals.
 void setEndtime(long endtime)
          Set the end time.
 void setStarttime(long starttime)
          Set the start time.
 void setState(String state)
          Set the negotiation state.
 void setWinnerProposals(Object[] proposals)
          Set the winner proposals.
 int size()
          Get the number of proposals.
 String toString()
          Get the string representation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OPEN

public static final String OPEN
The negotiation is not yet finished.

See Also:
Constant Field Values

SUCCEEDED

public static final String SUCCEEDED
The negotiation has finished successfully.

See Also:
Constant Field Values

FAILED

public static final String FAILED
The negotiation is finished with a failure.

See Also:
Constant Field Values
Constructor Detail

NegotiationRecord

public NegotiationRecord(Object cfp)
Create a new negotiation record.

Parameters:
cfp - The call for proposal.
Method Detail

addProposal

public void addProposal(IMessageEvent msg)
Add a proposal (and the message).

Parameters:
msg - The proposal message.

setAcceptableProposals

public void setAcceptableProposals(Object[] proposals)
Set the acceptable proposals.

Parameters:
proposals - The acceptable proposals.

setWinnerProposals

public void setWinnerProposals(Object[] proposals)
Set the winner proposals.

Parameters:
proposals - The winner proposals.

addExecutedTask

public void addExecutedTask(Object task)
Add an executed task.

Parameters:
task - The executed task.

getProposals

public Object[] getProposals()
Get all proposals.

Returns:
All proposals.

getAcceptableProposals

public Object[] getAcceptableProposals()
Get the acceptable proposals.

Returns:
The acceptable proposals.

getWinnerProposals

public Object[] getWinnerProposals()
Get the winner proposals.

Returns:
The winner proposals.

getTasks

public Object[] getTasks()
Get the executed tasks.

Returns:
The executed tasks.

getWinnerParticipants

public AgentIdentifier[] getWinnerParticipants()
Get the winner participants.

Returns:
The winner participants.

getNonAcceptableProposals

public Object[] getNonAcceptableProposals()
Get the non-acceptable proposals.

Returns:
The non-acceptable proposals.

getNonWinnerProposals

public Object[] getNonWinnerProposals()
Get the non-winner proposals.

Returns:
The non-winner proposals.

getAgentIdentifier

public AgentIdentifier getAgentIdentifier(Object proposal)
Get the sender of a proposal.

Parameters:
proposal - The proposal.
Returns:
The sender of the proposal.

getMessageEvent

public IMessageEvent getMessageEvent(Object proposal)
Get the message event for a proposal.

Parameters:
proposal - The proposal.
Returns:
The message event for a proposal.

getProposal

public Object getProposal(AgentIdentifier sender)
Get the proposal for the sender.

Parameters:
sender - The sender.
Returns:
The proposal.

getCFP

public Object getCFP()
Get the call for proposal.

Returns:
The call for proposal.

size

public int size()
Get the number of proposals.

Returns:
The number of proposals.

getState

public String getState()
Get the negotiation state.

Returns:
The state.

setState

public void setState(String state)
Set the negotiation state.

Parameters:
state - The state to set.

getStarttime

public long getStarttime()
Get the start time.

Returns:
The starttime.

setStarttime

public void setStarttime(long starttime)
Set the start time.

Parameters:
starttime - The start time to set.

getEndtime

public long getEndtime()
Get the end time.

Returns:
The endtime.

setEndtime

public void setEndtime(long endtime)
Set the end time.

Parameters:
endtime - The end time to set.

toString

public String toString()
Get the string representation.

Overrides:
toString in class Object
Returns:
The string representation.

Jadex 0.96-beta1

Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.