home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-05-08 | 2.7 KB | 65 lines |
- /*
- * Copyright (c) 1997-1998 Borland International, Inc. All Rights Reserved.
- *
- * This SOURCE CODE FILE, which has been provided by Borland as part
- * of a Borland product for use ONLY by licensed users of the product,
- * includes CONFIDENTIAL and PROPRIETARY information of Borland.
- *
- * USE OF THIS SOFTWARE IS GOVERNED BY THE TERMS AND CONDITIONS
- * OF THE LICENSE STATEMENT AND LIMITED WARRANTY FURNISHED WITH
- * THE PRODUCT.
- *
- * IN PARTICULAR, YOU WILL INDEMNIFY AND HOLD BORLAND, ITS RELATED
- * COMPANIES AND ITS SUPPLIERS, HARMLESS FROM AND AGAINST ANY CLAIMS
- * OR LIABILITIES ARISING OUT OF THE USE, REPRODUCTION, OR DISTRIBUTION
- * OF YOUR PROGRAMS, INCLUDING ANY CLAIMS OR LIABILITIES ARISING OUT OF
- * OR RESULTING FROM THE USE, MODIFICATION, OR DISTRIBUTION OF PROGRAMS
- * OR FILES CREATED FROM, BASED ON, AND/OR DERIVED FROM THIS SOURCE
- * CODE FILE.
- */
-
- package borland.samples.apps.chess.client;
-
- /** The data stucture used by the classes that send/receive messages as sent between client and server
- * @param int port the port number of the originator of the message (used by server only)
- * @param String msgid The message type (cannot contain any spaces)
- * @param String msg The message type specific data
- */
- public class ServerMessage
- {
- public int port; //who sent it
- public String msgid; //message type
- public String msg; //message type specific data
- public static String BYE = "Bye";
- public static String TOKEN = "Token";
- public static String REFUSED = "Refused";
- public static String STATUS = "Status";
- public static String CHAT = "Chat";
- public static String LIST = "List";
- public static String WELCOME = "Welcome";
- public static String PLAYER_LIST = "PlayerList";
- public static String LIBRARY_LIST = "LibraryList";
- public static String MOVE_LIST = "MoveList";
- public static String RESUME = "Resume";
- public static String LIBRARY_GAME = "LibraryGame";
- public static String RESIGNED = "Resigned";
- public static String MOVED = "Moved";
- public static String TOKEN_MOVE = "TokenMove";
- public static String ACCEPT_ABORT = "AcceptAbort";
- public static String ACCEPT_DRAW = "AcceptDraw";
- public static String GAME_ACCEPTED = "GameAccepted";
- public static String INFORMATION = "Information";
- public static String INFO = "Info";
- public static String OFFER_DRAW = "OfferDraw";
- public static String OFFER_ABORT = "OfferAbort";
- public static String CHALLENGED = "Challenged" ;
- public static String DEAD = "Dead" ;
-
-
- public ServerMessage(int port,String messageId,String message) {
- this.port = port;
- this.msgid = messageId;
- this.msg = message;
- }
- }
-