comparison src/org/dancres/blitz/RegTicketImpl.java @ 0:3dc0c5604566

Initial checkin of blitz 2.0 fcs - no installer yet.
author Dan Creswell <dan.creswell@gmail.com>
date Sat, 21 Mar 2009 11:00:06 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:3dc0c5604566
1 package org.dancres.blitz;
2
3 import org.dancres.blitz.lease.SpaceUID;
4
5 import org.dancres.blitz.notify.Registrar;
6
7 /**
8 Contains the necessary details to build an EventRegistration object.
9 These details are internal source ID, initial sequence number and
10 UID (which will be converted into a SpaceUID). The raw details are
11 received from EventQueue via the Registrar interface. The details are then
12 slightly massaged (convert UID to SpaceUID). This object is then
13 returned to the caller who can then turn these details into a suitable
14 EventRegistration object.
15 */
16 class RegTicketImpl implements RegTicket, Registrar {
17 private long theInternalSource;
18 private long theInitialSequenceNum;
19 private SpaceUID theUID;
20 private long theExpirationTime;
21
22 RegTicketImpl(long anExpirationTime) {
23 theExpirationTime = anExpirationTime;
24 }
25
26 public void newRegistration(long aSourceId, long aSeqNum,
27 SpaceUID aUID) {
28 theInternalSource = aSourceId;
29 theInitialSequenceNum = aSeqNum;
30 theUID = aUID;
31 }
32
33 public SpaceUID getUID() {
34 return theUID;
35 }
36
37 public long getSourceId() {
38 return theInternalSource;
39 }
40
41 public long getSeqNum() {
42 return theInitialSequenceNum;
43 }
44
45 public long getExpirationTime() {
46 return theExpirationTime;
47 }
48 }