KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > easybeans > component > smartclient > api > ProtocolConstants


1 /**
2  * EasyBeans
3  * Copyright (C) 2006 Bull S.A.S.
4  * Contact: easybeans@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id:$
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.easybeans.component.smartclient.api;
27
28 /**
29  * Describes all protocol's value used to exchange messages.
30  * @author Florent Benoit
31  */

32 public interface ProtocolConstants {
33
34     /**
35      * Gets protocol's version.
36      * @return the version of the protocol.
37      */

38     byte version();
39
40
41     /**
42      * Version of the protocol.
43      */

44     byte PROTOCOL_VERSION = 0x01;
45
46     /**
47      * Client asking for a Class.
48      */

49     byte CLASS_REQUEST = (byte) 0x01;
50
51     /**
52      * Server answering for a class.
53      */

54     byte CLASS_ANSWER = (byte) 0x02;
55
56     /**
57      * Server answering for a class that was not found.
58      */

59     byte CLASS_NOT_FOUND = (byte) 0x03;
60
61     /**
62      * Client asking for a resource.
63      */

64     byte RESOURCE_REQUEST = (byte) 0x04;
65
66     /**
67      * Server answering for a resource.
68      */

69     byte RESOURCE_ANSWER = (byte) 0x05;
70
71     /**
72      * Server answering for a resource that was not found.
73      */

74     byte RESOURCE_NOT_FOUND = (byte) 0x06;
75
76     /**
77      * Ask for the PROVIDER_URL.
78      */

79     byte PROVIDER_URL_REQUEST = (byte) 0x07;
80
81     /**
82      * Gets the PROVIDER_URL.
83      */

84     byte PROVIDER_URL_ANSWER = (byte) 0x08;
85
86
87 }
88
Popular Tags