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;
05:
06: import com.tc.async.api.EventContext;
07: import com.tc.bytes.TCByteBuffer;
08: import com.tc.lang.Recyclable;
09:
10: /**
11: * @author teck
12: */
13: public interface TCNetworkMessage extends EventContext, Recyclable {
14:
15: public TCNetworkHeader getHeader();
16:
17: public TCNetworkMessage getMessagePayload();
18:
19: public TCByteBuffer[] getPayload();
20:
21: public TCByteBuffer[] getEntireMessageData();
22:
23: public boolean isSealed();
24:
25: public void seal();
26:
27: public int getDataLength();
28:
29: public int getHeaderLength();
30:
31: public int getTotalLength();
32:
33: public void wasSent();
34:
35: public void setSentCallback(Runnable callback);
36:
37: public Runnable getSentCallback();
38: }
|