KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > net > protocol > tcm > ServerMessageChannelImpl


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.tc.net.protocol.tcm;
5
6 import com.tc.logging.TCLogger;
7 import com.tc.logging.TCLogging;
8 import com.tc.net.protocol.NetworkStackID;
9
10 /**
11  * TODO: Document me
12  *
13  * @author teck
14  */

15 public class ServerMessageChannelImpl extends AbstractMessageChannel implements ServerMessageChannel {
16   private static final TCLogger logger = TCLogging.getLogger(ServerMessageChannel.class);
17   private final ChannelID sessionID;
18
19   /**
20    * this is for the server it needs a session ID
21    */

22   protected ServerMessageChannelImpl(ChannelID sessionID, TCMessageRouter router, TCMessageFactory msgFactory) {
23     super(router, logger, msgFactory);
24     this.sessionID = sessionID;
25
26     // server message channels should always be open initially
27
this.getStatus().open();
28   }
29
30   public ChannelID getChannelID() {
31     return sessionID;
32   }
33
34   public NetworkStackID open() {
35     throw new UnsupportedOperationException JavaDoc("Server channels don't support open()");
36   }
37
38 }
Popular Tags