aim4.msg.i2v
Class Reject

java.lang.Object
  extended by aim4.msg.i2v.I2VMessage
      extended by aim4.msg.i2v.Reject

public class Reject
extends I2VMessage

Message sent from an Intersection Manager to a Vehicle to reject a reservation request.


Nested Class Summary
static class Reject.Reason
          Some of the possible reasons that a vehicle may have a reservation rejected.
 
Nested classes/interfaces inherited from class aim4.msg.i2v.I2VMessage
I2VMessage.Type
 
Field Summary
 
Fields inherited from class aim4.msg.i2v.I2VMessage
messageType, size
 
Constructor Summary
Reject(int sourceID, int destinationID, int requestId, double nextAllowedCommunication, Reject.Reason reason)
          Constructor with specific reason for rejection and limit on when the next acceptable transmission is.
 
Method Summary
 double getNextAllowedCommunication()
          Get the time after which communication will again be accepted by the IntersectionManager.
 Reject.Reason getReason()
          Get the reason that this Reject message was sent.
 int getRequestId()
          Get the request ID of the request message this reject message correspond to.
 String toString()
          
 
Methods inherited from class aim4.msg.i2v.I2VMessage
getImId, getMessageType, getSize, getVin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Reject

public Reject(int sourceID,
              int destinationID,
              int requestId,
              double nextAllowedCommunication,
              Reject.Reason reason)
Constructor with specific reason for rejection and limit on when the next acceptable transmission is.

Parameters:
sourceID - the ID number of the IntersectionManager sending this message
destinationID - the ID number of the Vehicle to which this message is being sent
requestId - the request id of the request message this reject message corresponds to
nextAllowedCommunication - the time after which communication will accepted by the IntersectionManager
reason - the reason this Reject message is being sent
Method Detail

getRequestId

public int getRequestId()
Get the request ID of the request message this reject message correspond to.

Returns:
the id of the request message.

getNextAllowedCommunication

public double getNextAllowedCommunication()
Get the time after which communication will again be accepted by the IntersectionManager.

Returns:
the time after which communication will be accepted by the IntersectionManager

getReason

public Reject.Reason getReason()
Get the reason that this Reject message was sent.

Returns:
the reason this Reject message was sent

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.