01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.net.protocol.tcm;
05:
06: import com.tc.logging.TCLogger;
07: import com.tc.logging.TCLogging;
08: import com.tc.net.protocol.NetworkStackID;
09:
10: /**
11: * TODO: Document me
12: *
13: * @author teck
14: */
15: public class ServerMessageChannelImpl extends AbstractMessageChannel
16: implements ServerMessageChannel {
17: private static final TCLogger logger = TCLogging
18: .getLogger(ServerMessageChannel.class);
19: private final ChannelID sessionID;
20:
21: /**
22: * this is for the server it needs a session ID
23: */
24: protected ServerMessageChannelImpl(ChannelID sessionID,
25: TCMessageRouter router, TCMessageFactory msgFactory) {
26: super (router, logger, msgFactory);
27: this .sessionID = sessionID;
28:
29: // server message channels should always be open initially
30: this .getStatus().open();
31: }
32:
33: public ChannelID getChannelID() {
34: return sessionID;
35: }
36:
37: public NetworkStackID open() {
38: throw new UnsupportedOperationException(
39: "Server channels don't support open()");
40: }
41:
42: }
|