comparison src/org/dancres/blitz/VisitorBaulkedPartyFactory.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.txnlock.BaulkedParty;
4 import org.dancres.blitz.mangler.MangledEntry;
5 import org.dancres.blitz.oid.OID;
6
7 /**
8 * <code>SearchVisitor</code>s must supply a conflict resolution implementation
9 * to <code>TxnLock</code>s however they have insufficient context to determine
10 * what that implementation is and we need the code using
11 * <code>SearchVisitor</code>s to be able to interact with the conflict
12 * resolution code. To handle both these issues, we have
13 * <code>SearchVisitor</code>s accept an instance of the below and use it
14 * to generate conflict handlers for the transaction code.
15 */
16 public interface VisitorBaulkedPartyFactory {
17 public BaulkedParty newParty(SingleMatchTask aMatchTask);
18 public BaulkedParty newParty(BulkTakeVisitor aMatchTask);
19 public void enableResolutionSignal();
20
21 /**
22 * Common class to be used as handbacks for the instances of
23 * <code>BaulkedParty</code> returned by the underlying factory
24 * implementation.
25 */
26 static class Handback {
27 private String theType;
28 private OID theOID;
29 private MangledEntry theEntry;
30
31 Handback(String aType, OID anOID, MangledEntry anEntry) {
32 theType = aType;
33 theOID = anOID;
34 theEntry = anEntry;
35 }
36
37 String getType() {
38 return theType;
39 }
40
41 OID getOID() {
42 return theOID;
43 }
44
45 MangledEntry getEntry() {
46 return theEntry;
47 }
48 }
49 }