home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 October A / Pcwk10a98.iso / Inprise / TRIAL / JBUILDER / JSAMPLES.Z / ServerMessage.java < prev    next >
Text File  |  1998-05-08  |  3KB  |  65 lines

  1. /*
  2.  * Copyright (c) 1997-1998 Borland International, Inc. All Rights Reserved.
  3.  * 
  4.  * This SOURCE CODE FILE, which has been provided by Borland as part
  5.  * of a Borland product for use ONLY by licensed users of the product,
  6.  * includes CONFIDENTIAL and PROPRIETARY information of Borland.  
  7.  *
  8.  * USE OF THIS SOFTWARE IS GOVERNED BY THE TERMS AND CONDITIONS 
  9.  * OF THE LICENSE STATEMENT AND LIMITED WARRANTY FURNISHED WITH
  10.  * THE PRODUCT.
  11.  *
  12.  * IN PARTICULAR, YOU WILL INDEMNIFY AND HOLD BORLAND, ITS RELATED
  13.  * COMPANIES AND ITS SUPPLIERS, HARMLESS FROM AND AGAINST ANY CLAIMS
  14.  * OR LIABILITIES ARISING OUT OF THE USE, REPRODUCTION, OR DISTRIBUTION
  15.  * OF YOUR PROGRAMS, INCLUDING ANY CLAIMS OR LIABILITIES ARISING OUT OF
  16.  * OR RESULTING FROM THE USE, MODIFICATION, OR DISTRIBUTION OF PROGRAMS
  17.  * OR FILES CREATED FROM, BASED ON, AND/OR DERIVED FROM THIS SOURCE
  18.  * CODE FILE.
  19.  */
  20.  
  21. package borland.samples.apps.chess.client;
  22.  
  23. /** The data stucture used by the classes that send/receive messages as sent between client and server
  24. * @param int port the port number of the originator of the message (used by server only)
  25. * @param String msgid The message type (cannot contain any spaces)
  26. * @param String msg The message type specific data
  27. */
  28. public class ServerMessage
  29. {
  30.   public int    port;    //who sent it
  31.   public String msgid;   //message type
  32.   public String msg;     //message type specific data
  33.   public static String  BYE = "Bye";
  34.   public static String  TOKEN = "Token";
  35.   public static String  REFUSED = "Refused";
  36.   public static String  STATUS = "Status";
  37.   public static String  CHAT = "Chat";
  38.   public static String  LIST = "List";
  39.   public static String  WELCOME = "Welcome";
  40.   public static String  PLAYER_LIST = "PlayerList";
  41.   public static String  LIBRARY_LIST = "LibraryList";
  42.   public static String  MOVE_LIST = "MoveList";
  43.   public static String  RESUME = "Resume";
  44.   public static String  LIBRARY_GAME = "LibraryGame";
  45.   public static String  RESIGNED = "Resigned";
  46.   public static String  MOVED = "Moved";
  47.   public static String  TOKEN_MOVE = "TokenMove";
  48.   public static String  ACCEPT_ABORT = "AcceptAbort";
  49.   public static String  ACCEPT_DRAW = "AcceptDraw";
  50.   public static String  GAME_ACCEPTED = "GameAccepted";
  51.   public static String  INFORMATION = "Information";
  52.   public static String  INFO = "Info";
  53.   public static String  OFFER_DRAW = "OfferDraw";
  54.   public static String  OFFER_ABORT = "OfferAbort";
  55.   public static String  CHALLENGED = "Challenged"  ;
  56.   public static String  DEAD = "Dead"  ;
  57.  
  58.  
  59.   public ServerMessage(int port,String messageId,String message) {
  60.     this.port  = port;
  61.     this.msgid = messageId;
  62.     this.msg   = message;
  63.   }
  64. }
  65.