001 // Copyright 2009 Waterken Inc. under the terms of the MIT X license
002 // found at http://www.opensource.org/licenses/mit-license.html
003 package org.ref_send.log;
004
005 import org.ref_send.deserializer;
006 import org.ref_send.name;
007
008 /**
009 * Logs {@linkplain org.ref_send.promise.Resolver#reject rejection} of a
010 * promise.
011 */
012 public class
013 Rejected extends Resolved {
014 static private final long serialVersionUID = 1L;
015
016 /**
017 * reason for rejecting the promise
018 */
019 public final Exception reason;
020
021 /**
022 * Constructs an instance.
023 * @param anchor {@link #anchor}
024 * @param timestamp {@link #timestamp}
025 * @param trace {@link #trace}
026 * @param condition {@link #condition}
027 * @param reason {@link #reason}
028 */
029 public @deserializer
030 Rejected(@name("anchor") final Anchor anchor,
031 @name("timestamp") final Long timestamp,
032 @name("trace") final Trace trace,
033 @name("condition") final String condition,
034 @name("reason") final Exception reason) {
035 super(anchor, timestamp, trace, condition);
036 this.reason = reason;
037 }
038 }