KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > objectserver > lockmanager > api > NullChannelManager


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.lockmanager.api;
6
7 import com.tc.net.protocol.tcm.ChannelID;
8 import com.tc.net.protocol.tcm.MessageChannel;
9 import com.tc.object.msg.BatchTransactionAcknowledgeMessage;
10 import com.tc.object.net.DSOChannelManager;
11 import com.tc.object.net.DSOChannelManagerEventListener;
12
13 import java.util.Collection JavaDoc;
14 import java.util.Collections JavaDoc;
15
16 /**
17  * @author steve
18  */

19 public class NullChannelManager implements DSOChannelManager {
20
21   public boolean isActiveID(ChannelID channelID) {
22     return true;
23   }
24
25   public MessageChannel getActiveChannel(ChannelID id) {
26     throw new UnsupportedOperationException JavaDoc();
27   }
28
29   public MessageChannel[] getActiveChannels() {
30     return new MessageChannel[] {};
31   }
32
33   public void closeAll(Collection JavaDoc channelIDs) {
34     return;
35   }
36
37   public String JavaDoc getChannelAddress(ChannelID channelID) {
38     return "";
39   }
40
41   public BatchTransactionAcknowledgeMessage newBatchTransactionAcknowledgeMessage(ChannelID channelID) {
42     throw new UnsupportedOperationException JavaDoc();
43   }
44
45   public Collection JavaDoc getAllActiveChannelIDs() {
46     return Collections.EMPTY_LIST;
47   }
48
49   public void addEventListener(DSOChannelManagerEventListener listener) {
50     //
51
}
52
53   public void makeChannelActive(ChannelID channelID, long startIDs, long endIDs, boolean persistent) {
54     //
55
}
56
57   public Collection JavaDoc getRawChannelIDs() {
58     return Collections.EMPTY_LIST;
59   }
60
61   public void makeChannelActiveNoAck(MessageChannel channel) {
62     //
63
}
64
65 }
Popular Tags