KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > net > protocol > transport > MessageTransportState


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.transport;
5
6 public class MessageTransportState {
7   /**
8    * XXX: move to client state machine Initial state for client transports.
9    */

10   public static final MessageTransportState STATE_START = new MessageTransportState("START");
11
12   public static final MessageTransportState STATE_RESTART = new MessageTransportState("RESTART");
13
14   /**
15    * XXX: Move to client state machine SYN message sent, waiting for reply
16    */

17   public static final MessageTransportState STATE_SYN_SENT = new MessageTransportState("SYN_SENT");
18   // /**
19
// * XXX: Move to server state machine
20
// */
21
// public static final MessageTransportState STATE_SYN_ACK_SENT = new
22
// MessageTransportState("SYN_ACK_SENT");
23
/**
24    * The client sends a SYN with a connection id that we can't reconnect to
25    * (e.g. we can't find the corresponding server-side stack).
26    */

27   public static final MessageTransportState STATE_SYN_ACK_ERROR = new MessageTransportState("SYN_ACK_ERROR");
28
29   /**
30    * XXX: Move to client state machine SYN_ACK received-- we're ready to talk!
31    */

32   public static final MessageTransportState STATE_ESTABLISHED = new MessageTransportState("ESTABLISHED");
33
34   /**
35    * End state-- if the client is disconnected and isn't going to reconnect or
36    * if there is a handshake error (server or client)
37    */

38   public static final MessageTransportState STATE_END = new MessageTransportState("END");
39
40   private final String JavaDoc name;
41
42   private MessageTransportState(String JavaDoc name) {
43     this.name = name;
44   }
45
46   public String JavaDoc toString() {
47     return this.name;
48   }
49 }
Popular Tags