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.transport;
05:
06: public class MessageTransportState {
07: /**
08: * XXX: move to client state machine Initial state for client transports.
09: */
10: public static final MessageTransportState STATE_START = new MessageTransportState(
11: "START");
12:
13: public static final MessageTransportState STATE_RESTART = new MessageTransportState(
14: "RESTART");
15:
16: /**
17: * XXX: Move to client state machine SYN message sent, waiting for reply
18: */
19: public static final MessageTransportState STATE_SYN_SENT = new MessageTransportState(
20: "SYN_SENT");
21: // /**
22: // * XXX: Move to server state machine
23: // */
24: // public static final MessageTransportState STATE_SYN_ACK_SENT = new
25: // MessageTransportState("SYN_ACK_SENT");
26: /**
27: * The client sends a SYN with a connection id that we can't reconnect to
28: * (e.g. we can't find the corresponding server-side stack).
29: */
30: public static final MessageTransportState STATE_SYN_ACK_ERROR = new MessageTransportState(
31: "SYN_ACK_ERROR");
32:
33: /**
34: * XXX: Move to client state machine SYN_ACK received-- we're ready to talk!
35: */
36: public static final MessageTransportState STATE_ESTABLISHED = new MessageTransportState(
37: "ESTABLISHED");
38:
39: /**
40: * End state-- if the client is disconnected and isn't going to reconnect or
41: * if there is a handshake error (server or client)
42: */
43: public static final MessageTransportState STATE_END = new MessageTransportState(
44: "END");
45:
46: private final String name;
47:
48: private MessageTransportState(String name) {
49: this .name = name;
50: }
51:
52: public String toString() {
53: return this.name;
54: }
55: }
|