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.async.api.EventContext;
07: import com.tc.net.groups.ClientID;
08: import com.tc.object.session.SessionID;
09:
10: import java.io.IOException;
11:
12: /**
13: * Base interface for application level messages sent through the TC messaging stack
14: */
15: public interface TCMessage extends EventContext {
16:
17: public TCMessageType getMessageType();
18:
19: /**
20: * Hydrates the message with the given local session id.
21: */
22: public void hydrate() throws IOException, UnknownNameException;
23:
24: public void dehydrate();
25:
26: public void send();
27:
28: public MessageChannel getChannel();
29:
30: public ClientID getClientID();
31:
32: /**
33: * The local session id is the session on the local side of the message bus. E.g., if this is a client, then it's the
34: * client session id; likewise, if this is a server, then its the server session id.
35: */
36: public SessionID getLocalSessionID();
37:
38: public int getTotalLength();
39:
40: }
|