KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > objectserver > core > impl > TestServerConfigurationContext


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.objectserver.core.impl;
6
7 import com.tc.async.api.Stage;
8 import com.tc.exception.ImplementMe;
9 import com.tc.l2.api.L2Coordinator;
10 import com.tc.logging.TCLogger;
11 import com.tc.logging.TCLogging;
12 import com.tc.object.net.ChannelStats;
13 import com.tc.object.net.DSOChannelManager;
14 import com.tc.objectserver.api.ObjectManager;
15 import com.tc.objectserver.api.ObjectRequestManager;
16 import com.tc.objectserver.core.api.ServerConfigurationContext;
17 import com.tc.objectserver.handshakemanager.ServerClientHandshakeManager;
18 import com.tc.objectserver.l1.api.ClientStateManager;
19 import com.tc.objectserver.lockmanager.api.LockManager;
20 import com.tc.objectserver.persistence.api.ManagedObjectStore;
21 import com.tc.objectserver.tx.ServerTransactionManager;
22 import com.tc.objectserver.tx.TransactionBatchReaderFactory;
23 import com.tc.objectserver.tx.TransactionalObjectManager;
24
25 import java.util.HashMap JavaDoc;
26 import java.util.Map JavaDoc;
27
28 public class TestServerConfigurationContext implements ServerConfigurationContext {
29
30   public ObjectManager objectManager;
31   public LockManager lockManager;
32   public DSOChannelManager channelManager;
33   public ClientStateManager clientStateManager;
34   public ServerTransactionManager transactionManager;
35   public ManagedObjectStore objectStore;
36   public ServerClientHandshakeManager clientHandshakeManager;
37   public ObjectRequestManager objectRequestManager;
38   public Map JavaDoc stages = new HashMap JavaDoc();
39   public ChannelStats channelStats;
40   public TransactionalObjectManager txnObjectManager;
41   public L2Coordinator l2Coordinator;
42
43   public void addStage(String JavaDoc name, Stage stage) {
44     stages.put(name, stage);
45   }
46
47   public ObjectManager getObjectManager() {
48     return this.objectManager;
49   }
50
51   public LockManager getLockManager() {
52     return this.lockManager;
53   }
54
55   public DSOChannelManager getChannelManager() {
56     return this.channelManager;
57   }
58
59   public ClientStateManager getClientStateManager() {
60     return this.clientStateManager;
61   }
62
63   public ServerTransactionManager getTransactionManager() {
64     return this.transactionManager;
65   }
66
67   public ManagedObjectStore getObjectStore() {
68     return this.objectStore;
69   }
70
71   public ServerClientHandshakeManager getClientHandshakeManager() {
72     return this.clientHandshakeManager;
73   }
74
75   public Stage getStage(String JavaDoc name) {
76     return (Stage) this.stages.get(name);
77   }
78
79   public TCLogger getLogger(Class JavaDoc clazz) {
80     return TCLogging.getLogger(getClass());
81   }
82
83   public ChannelStats getChannelStats() {
84     return this.channelStats;
85   }
86
87   public TransactionBatchReaderFactory getTransactionBatchReaderFactory() {
88     throw new ImplementMe();
89   }
90
91   public ObjectRequestManager getObjectRequestManager() {
92     return objectRequestManager;
93   }
94
95   public TransactionalObjectManager getTransactionalObjectManager() {
96     return txnObjectManager;
97   }
98
99   public L2Coordinator getL2Coordinator() {
100     return l2Coordinator;
101   }
102
103 }
104
Popular Tags