KickJava   Java API By Example, From Geeks To Geeks.

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


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.async.api.EventContext;
7 import com.tc.object.session.SessionID;
8
9 import java.io.IOException JavaDoc;
10
11 /**
12  * Base interface for application level messages sent through the TC messaging stack
13  */

14 public interface TCMessage extends EventContext {
15
16   public TCMessageType getMessageType();
17
18   /**
19    * Hydrates the message with the given local session id.
20    */

21   public void hydrate() throws IOException JavaDoc, UnknownNameException;
22
23   public void dehydrate();
24
25   public void send();
26
27   public MessageChannel getChannel();
28
29   public ChannelID getChannelID();
30
31   /**
32    * 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
33    * client session id; likewise, if this is a server, then its the server session id.
34    */

35   public SessionID getLocalSessionID();
36
37   public int getTotalLength();
38
39 }
Popular Tags