X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=src%2Fro%2Fieval%2Ffonbot%2FAddress.java;h=5777cfe54978799a41e3582222adc3150f465429;hb=10f7c6fc77bfbaba1f1d8c429173cf55671118e3;hp=59fc0d74ccf6f055b21965c0e72a435712e3a4da;hpb=740a6fa59649fc6edced392dbbdcd74363f489c5;p=fonbot.git diff --git a/src/ro/ieval/fonbot/Address.java b/src/ro/ieval/fonbot/Address.java index 59fc0d7..5777cfe 100644 --- a/src/ro/ieval/fonbot/Address.java +++ b/src/ro/ieval/fonbot/Address.java @@ -65,6 +65,9 @@ final class Address { */ public final String data; + /** The ID of this request. Used in annotations. Can be null */ + public final transient String requestId; + /** * Construct an Address from its parts * @@ -74,6 +77,20 @@ final class Address { public Address(final Protocol protocol, final @Nullable String data){ this.protocol=protocol; this.data=data; + this.requestId=null; + } + + /** + * Construct an Address from its parts + * + * @param protocol the protocol part of the Address + * @param data the data part of the Address + * @param requestId the request ID + */ + public Address(final Protocol protocol, final @Nullable String data, final String requestId){ + this.protocol=protocol; + this.data=data; + this.requestId=requestId; } /** @@ -86,6 +103,7 @@ final class Address { final String[] parts=address.split(" ", 2); this.protocol=Protocol.valueOf(parts[0]); this.data=parts[1]; + this.requestId=null; } /**