aim4.msg.i2v

## Class Reject

- java.lang.Object
- - aim4.msg.i2v.I2VMessage
  - - 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

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `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

    Constructors
    Constructor and Description
    `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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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 © 2013. All rights reserved.