KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tctest > InterfaceTestApp


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tctest;
5
6 import com.tc.exception.ImplementMe;
7 import com.tc.object.config.ConfigVisitor;
8 import com.tc.object.config.DSOClientConfigHelper;
9 import com.tc.object.config.TransparencyClassSpec;
10 import com.tc.simulator.app.ApplicationConfig;
11 import com.tc.simulator.listener.ListenerProvider;
12 import com.tctest.runner.AbstractTransparentApp;
13
14 /**
15  * TODO May 17, 2005: I, steve, am too lazy to write a single sentence describing what this class is for.
16  */

17 public class InterfaceTestApp extends AbstractTransparentApp {
18
19   public InterfaceTestApp(String JavaDoc appId, ApplicationConfig cfg, ListenerProvider listenerProvider) {
20     super(appId, cfg, listenerProvider);
21   }
22
23   public void run() {
24     new InterfaceTestAppInterface() {
25
26       public void testMethod(String JavaDoc s, int i, FooObject1 foo) {
27         throw new ImplementMe();
28
29       }
30
31     };
32   }
33
34   public static void visitL1DSOConfig(ConfigVisitor visitor, DSOClientConfigHelper config) {
35     String JavaDoc testClass = InterfaceTestAppInterface.class.getName();
36     TransparencyClassSpec spec = config.getOrCreateSpec(testClass);
37
38     String JavaDoc methodExpression = "* " + testClass + "*.*(..)";
39     config.addWriteAutolock(methodExpression);
40     spec.addRoot("myArrayTestRoot", "myArrayTestRoot");
41
42   }
43 }
44
Popular Tags