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.object.msg;
05:
06: import com.tc.async.api.EventContext;
07: import com.tc.bytes.TCByteBuffer;
08: import com.tc.io.TCByteBufferOutput;
09: 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
20: EventContext {
21:
22: private final SessionID localSessionID;
23:
24: public DSOMessageBase(SessionID sessionID, MessageMonitor monitor,
25: TCByteBufferOutput out, MessageChannel channel,
26: TCMessageType type) {
27: super (monitor, out, channel, type);
28: this .localSessionID = sessionID;
29: }
30:
31: public DSOMessageBase(SessionID sessionID, MessageMonitor monitor,
32: MessageChannel channel, TCMessageHeader header,
33: TCByteBuffer[] data) {
34: super (monitor, channel, header, data);
35: this .localSessionID = sessionID;
36: }
37:
38: public SessionID getLocalSessionID() {
39: return localSessionID;
40: }
41:
42: }
|