KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > msg > DSOMessageBase


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.object.msg;
5
6 import com.tc.async.api.EventContext;
7 import com.tc.bytes.TCByteBuffer;
8 import com.tc.io.TCByteBufferOutput;
9 import com.tc.net.protocol.tcm.MessageChannel;
10 import com.tc.net.protocol.tcm.MessageMonitor;
11 import com.tc.net.protocol.tcm.TCMessageHeader;
12 import com.tc.net.protocol.tcm.TCMessageImpl;
13 import com.tc.net.protocol.tcm.TCMessageType;
14 import com.tc.object.session.SessionID;
15
16 /**
17  * Base class for DSO network messages
18  */

19 public class DSOMessageBase extends TCMessageImpl implements EventContext {
20
21   private final SessionID localSessionID;
22
23   public DSOMessageBase(MessageMonitor monitor, TCByteBufferOutput out, MessageChannel channel, TCMessageType type) {
24     super(monitor, out, channel, type);
25     this.localSessionID = SessionID.NULL_ID;
26   }
27
28   public DSOMessageBase(SessionID sessionID, MessageMonitor monitor, MessageChannel channel, TCMessageHeader header,
29                         TCByteBuffer[] data) {
30     super(monitor, channel, header, data);
31     this.localSessionID = sessionID;
32   }
33
34   public SessionID getLocalSessionID() {
35     return localSessionID;
36   }
37
38 }
39
Popular Tags