KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > config > DSOClientConfigHelper


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

5 package com.tc.object.config;
6
7 import com.tc.asm.ClassAdapter;
8 import com.tc.asm.ClassVisitor;
9 import com.tc.asm.ClassWriter;
10 import com.tc.aspectwerkz.reflect.ClassInfo;
11 import com.tc.aspectwerkz.reflect.MemberInfo;
12 import com.tc.config.schema.NewCommonL1Config;
13 import com.tc.object.Portability;
14 import com.tc.object.bytecode.ClassAdapterFactory;
15 import com.tc.object.bytecode.TransparencyClassAdapter;
16 import com.tc.object.config.schema.DSOInstrumentationLoggingOptions;
17 import com.tc.object.config.schema.DSORuntimeLoggingOptions;
18 import com.tc.object.config.schema.DSORuntimeOutputOptions;
19 import com.tc.object.config.schema.InstrumentedClass;
20 import com.tc.object.logging.InstrumentationLogger;
21 import com.terracottatech.config.Modules;
22
23 import java.util.Collection JavaDoc;
24 import java.util.Iterator JavaDoc;
25 import java.util.Map JavaDoc;
26
27 /**
28  * Knows how to interpret the DSO client config and tell you things like whether a class is portable. This interface
29  * extends DSOApplicationConfig which is a much simpler interface suitable for manipulating the config from the
30  * perspective of generating a configuration file.
31  */

32 public interface DSOClientConfigHelper extends DSOApplicationConfig {
33
34   boolean shouldBeAdapted(ClassInfo classInfo);
35
36   boolean isNeverAdaptable(ClassInfo classInfo);
37
38   boolean isLogical(String JavaDoc theClass);
39
40   DSOInstrumentationLoggingOptions getInstrumentationLoggingOptions();
41
42   void verifyBootJarContents() throws IncompleteBootJarException, UnverifiedBootJarException;
43
44   TransparencyClassSpec[] getAllSpecs();
45
46   Iterator JavaDoc getAllUserDefinedBootSpecs();
47
48   TransparencyClassAdapter createDsoClassAdapterFor(ClassVisitor writer, ClassInfo classInfo,
49                                                     InstrumentationLogger lgr, ClassLoader JavaDoc caller,
50                                                     final boolean forcePortable);
51
52   ClassAdapter createClassAdapterFor(ClassWriter writer, ClassInfo classInfo, InstrumentationLogger lgr,
53                                      ClassLoader JavaDoc caller);
54
55   ClassAdapter createClassAdapterFor(ClassWriter writer, ClassInfo classInfo, InstrumentationLogger lgr,
56                                      ClassLoader JavaDoc caller, boolean disableSuperClassTypeChecking);
57
58   boolean isCallConstructorOnLoad(String JavaDoc className);
59
60   // String getChangeApplicatorClassNameFor(String className);
61
Class JavaDoc getChangeApplicator(Class JavaDoc clazz);
62
63   boolean isPortableModuleClass(Class JavaDoc clazz);
64
65   void setModuleSpecs(ModuleSpec[] pluginSpecs);
66
67   TransparencyClassSpec getOrCreateSpec(String JavaDoc className);
68
69   TransparencyClassSpec getOrCreateSpec(String JavaDoc className, String JavaDoc applicator);
70
71   LockDefinition[] lockDefinitionsFor(int access, String JavaDoc className, String JavaDoc methodName, String JavaDoc description,
72                                       String JavaDoc[] exceptions);
73
74   boolean isRoot(String JavaDoc className, String JavaDoc fieldName);
75
76   boolean isRootDSOFinal(String JavaDoc className, String JavaDoc fieldName, boolean isPrimitive);
77
78   boolean isTransient(int modifiers, String JavaDoc classname, String JavaDoc field);
79
80   boolean isVolatile(int modifiers, String JavaDoc classname, String JavaDoc field);
81
82   String JavaDoc rootNameFor(String JavaDoc className, String JavaDoc fieldName);
83
84   boolean isLockMethod(int access, String JavaDoc className, String JavaDoc methodName, String JavaDoc description, String JavaDoc[] exceptions);
85
86   DistributedMethodSpec getDmiSpec(int modifiers, String JavaDoc className, String JavaDoc methodName, String JavaDoc description,
87                                   String JavaDoc[] exceptions);
88
89   TransparencyClassSpec getSpec(String JavaDoc className);
90
91   boolean isDSOSessions(String JavaDoc name);
92
93   DSORuntimeLoggingOptions runtimeLoggingOptions();
94
95   DSORuntimeOutputOptions runtimeOutputOptions();
96
97   DSOInstrumentationLoggingOptions instrumentationLoggingOptions();
98
99   int getFaultCount();
100
101   void addWriteAutolock(String JavaDoc methodPattern);
102
103   void addSynchronousWriteAutolock(String JavaDoc methodPattern);
104
105   void addLock(String JavaDoc methodPattern, LockDefinition lockDefinition);
106
107   void addReadAutolock(String JavaDoc methodPattern);
108
109   void addAutolock(String JavaDoc methodPattern, ConfigLockLevel type);
110
111   void setFaultCount(int count);
112
113   void addRoot(String JavaDoc className, String JavaDoc fieldName, String JavaDoc rootName, boolean addSpecForClass);
114
115   void addRoot(String JavaDoc className, String JavaDoc fieldName, String JavaDoc rootName, boolean dsoFinal, boolean addSpecForClass);
116
117   boolean matches(final Lock lock, final MemberInfo methodInfo);
118
119   boolean matches(final String JavaDoc expression, final MemberInfo methodInfo);
120
121   void addTransient(String JavaDoc className, String JavaDoc fieldName);
122
123   void addTransientType(String JavaDoc className, String JavaDoc fieldName);
124
125   String JavaDoc getOnLoadScriptIfDefined(String JavaDoc className);
126
127   String JavaDoc getPostCreateMethodIfDefined(String JavaDoc className);
128
129   String JavaDoc getOnLoadMethodIfDefined(String JavaDoc className);
130
131   boolean isUseNonDefaultConstructor(Class JavaDoc clazz);
132
133   void addIncludePattern(String JavaDoc expression);
134
135   NewCommonL1Config getNewCommonL1Config();
136
137   // Used for testing
138
void addIncludePattern(String JavaDoc expression, boolean honorTransient);
139
140   void addIncludePattern(String JavaDoc expression, boolean honorTransient, boolean oldStyleCallConstructorOnLoad,
141                          boolean honorVolatile);
142
143   // Used for testing and Spring
144
void addIncludeAndLockIfRequired(String JavaDoc expression, boolean honorTransient, boolean oldStyleCallConstructorOnLoad,
145                                    boolean honorVolatile, String JavaDoc lockExpression);
146
147   // Used for testing
148
void addExcludePattern(String JavaDoc expression);
149
150   boolean hasIncludeExcludePatterns();
151
152   boolean hasIncludeExcludePattern(ClassInfo classInfo);
153
154   void addAspectModule(String JavaDoc pattern, String JavaDoc moduleName);
155
156   Map JavaDoc getAspectModules();
157
158   void addDSOSpringConfig(DSOSpringConfigHelper config);
159
160   Collection JavaDoc getDSOSpringConfigs();
161
162   void addDistributedMethodCall(DistributedMethodSpec dms);
163
164   Portability getPortability();
165
166   void removeSpec(String JavaDoc className);
167
168   String JavaDoc getLogicalExtendingClassName(String JavaDoc className);
169
170   void addUserDefinedBootSpec(String JavaDoc className, TransparencyClassSpec spec);
171
172   void addApplicationName(String JavaDoc name);
173
174   void addSynchronousWriteApplication(String JavaDoc name);
175
176   void addInstrumentationDescriptor(InstrumentedClass classDesc);
177
178   Modules getModulesForInitialization();
179
180   void addNewModule(String JavaDoc name, String JavaDoc version);
181
182   boolean hasCustomAdapter(String JavaDoc fullName);
183
184   void addCustomAdapter(String JavaDoc name, ClassAdapterFactory adapterFactory);
185
186   int getSessionLockType(String JavaDoc appName);
187
188   Class JavaDoc getTCPeerClass(Class JavaDoc clazz);
189
190 }
191
Popular Tags