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.bytes.TCByteBuffer;
07:
08: /**
09: * @author teck
10: */
11: public class NullNetworkMessage implements TCNetworkMessage {
12:
13: public NullNetworkMessage() {
14: super ();
15: }
16:
17: public TCNetworkHeader getHeader() {
18: return new NullNetworkHeader();
19: }
20:
21: public TCNetworkMessage getMessagePayload() {
22: return null;
23: }
24:
25: public TCByteBuffer[] getPayload() {
26: return getEntireMessageData();
27: }
28:
29: public TCByteBuffer[] getEntireMessageData() {
30: return new TCByteBuffer[] {};
31: }
32:
33: public boolean isSealed() {
34: return true;
35: }
36:
37: public void seal() {
38: return;
39: }
40:
41: public int getDataLength() {
42: return 0;
43: }
44:
45: public int getHeaderLength() {
46: return 0;
47: }
48:
49: public int getTotalLength() {
50: return 0;
51: }
52:
53: public void wasSent() {
54: return;
55: }
56:
57: public void setSentCallback(Runnable callback) {
58: return;
59: }
60:
61: public Runnable getSentCallback() {
62: return null;
63: }
64:
65: public void recycle() {
66: return;
67: }
68:
69: }
|