View Javadoc

1   /*
2    *  Licensed to the Apache Software Foundation (ASF) under one
3    *  or more contributor license agreements.  See the NOTICE file
4    *  distributed with this work for additional information
5    *  regarding copyright ownership.  The ASF licenses this file
6    *  to you under the Apache License, Version 2.0 (the
7    *  "License"); you may not use this file except in compliance
8    *  with the License.  You may obtain a copy of the License at
9    *  
10   *    http://www.apache.org/licenses/LICENSE-2.0
11   *  
12   *  Unless required by applicable law or agreed to in writing,
13   *  software distributed under the License is distributed on an
14   *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   *  KIND, either express or implied.  See the License for the
16   *  specific language governing permissions and limitations
17   *  under the License. 
18   *  
19   */
20  
21  package org.apache.directory.server.dns.messages;
22  
23  
24  import org.apache.directory.server.dns.util.EnumConverter;
25  import org.apache.directory.server.dns.util.ReverseEnumMap;
26  
27  
28  /**
29   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
30   * @version $Rev: 547524 $, $Date: 2007-06-15 06:42:26 +0200 (Fr, 15 Jun 2007) $
31   */
32  public enum ServiceType implements EnumConverter<Byte>
33  {
34      /** Null */
35      NULL(0),
36  
37      /** Remote job entry */
38      RJE(5),
39  
40      /** Echo */
41      ECHO(7),
42  
43      /** Discard */
44      DISCARD(9),
45  
46      /** Active users */
47      USERS(11),
48  
49      /** Daytime */
50      DAYTIME(13),
51  
52      /** Quote of the day */
53      QUOTE(17),
54  
55      /** Character generator */
56      CHARGEN(19),
57  
58      /** File Transfer [Default Data] */
59      FTP_DATA(20),
60  
61      /** File Transfer [Control] */
62      FTP(21),
63  
64      /** Telnet */
65      TELNET(23),
66  
67      /** Simple Mail Transfer */
68      SMTP(25),
69  
70      /** NSW User System FE */
71      NSW_FE(27),
72  
73      /** MSG ICP */
74      MSG_ICP(29),
75  
76      /** MSG Authentication */
77      MSG_AUTH(31),
78  
79      /** Display Support Protocol */
80      DSP(33),
81  
82      /** Time */
83      TIME(37),
84  
85      /** Resource Location Protocol */
86      RLP(39),
87  
88      /** Graphics */
89      GRAPHICS(41),
90  
91      /** Host Name Server */
92      NAMESERVER(42),
93  
94      /** Who Is */
95      NICKNAME(43),
96  
97      /** MPM FLAGS Protocol */
98      MPM_FLAGS(44),
99  
100     /** Message Processing Module [recv] */
101     MPM(45),
102 
103     /** MPM [default send] */
104     MPM_SND(46),
105 
106     /** NI FTP */
107     NI_FTP(47),
108 
109     /** Login Host Protocol */
110     LOGIN(49),
111 
112     /** IMP Logical Address Maintenance */
113     LA_MAINT(51),
114 
115     /** Domain Name Server */
116     DOMAIN(53),
117 
118     /** ISI Graphics Language */
119     ISI_GL(55),
120 
121     /** NI MAIL */
122     NI_MAIL(61),
123 
124     /** VIA Systems - FTP */
125     VIA_FTP(63),
126 
127     /** TACACS-Database Service */
128     TACACS_DS(65),
129 
130     /** Bootstrap Protocol Server */
131     BOOTPS(67),
132 
133     /** Bootstrap Protocol Client */
134     BOOTPC(68),
135 
136     /** Trivial File Transfer */
137     TFTP(69),
138 
139     /** Remote Job Service */
140     NETRJS_1(71),
141 
142     /** Remote Job Service */
143     NETRJS_2(72),
144 
145     /** Remote Job Service */
146     NETRJS_3(73),
147 
148     /** Remote Job Service */
149     NETRJS_4(74),
150 
151     /** Finger */
152     FINGER(79),
153 
154     /** HOSTS2 Name Server */
155     HOSTS2_NS(81),
156 
157     /** SU/MIT Telnet Gateway */
158     SU_MIT_TG(89),
159 
160     /** MIT Dover Spooler */
161     MIT_DOV(91),
162 
163     /** Device Control Protocol */
164     DCP(93),
165 
166     /** SUPDUP */
167     SUPDUP(95),
168 
169     /** Swift Remote Virtual File Protocol */
170     SWIFT_RVF(97),
171 
172     /** TAC News */
173     TACNEWS(98),
174 
175     /** Metagram Relay */
176     METAGRAM(99),
177 
178     /** NIC Host Name Server */
179     HOSTNAME(101),
180 
181     /** ISO-TSAP */
182     ISO_TSAP(102),
183 
184     /** X400 */
185     X400(103),
186 
187     /** X400-SND */
188     X400_SND(104),
189 
190     /** Mailbox Name Nameserver */
191     CSNET_NS(105),
192 
193     /** Remote Telnet Service */
194     RTELNET(107),
195 
196     /** Post Office Protocol - Version 2 */
197     POP_2(109),
198 
199     /** SUN Remote Procedure Call */
200     SUNRPC(111),
201 
202     /** Authentication Service */
203     AUTH(113),
204 
205     /** Simple File Transfer Protocol */
206     SFTP(115),
207 
208     /** UUCP Path Service */
209     UUCP_PATH(117),
210 
211     /** Network News Transfer Protocol */
212     NNTP(119),
213 
214     /** HYDRA Expedited Remote Procedure */
215     ERPC(121),
216 
217     /** Network Time Protocol */
218     NTP(123),
219 
220     /** Locus PC-Interface Net Map Server */
221     LOCUS_MAP(125),
222 
223     /** Locus PC-Interface Conn Server */
224     LOCUS_CON(127),
225 
226     /** Password Generator Protocol */
227     PWDGEN(129),
228 
229     /** CISCO FNATIVE */
230     CISCO_FNA(130),
231 
232     /** CISCO TNATIVE */
233     CISCO_TNA(131),
234 
235     /** CISCO SYSMAINT */
236     CISCO_SYS(132),
237 
238     /** Statistics Service */
239     STATSRV(133),
240 
241     /** INGRES-NET Service */
242     INGRES_NET(134),
243 
244     /** Location Service */
245     LOC_SRV(135),
246 
247     /** PROFILE Naming System */
248     PROFILE(136),
249 
250     /** NETBIOS Name Service */
251     NETBIOS_NS(137),
252 
253     /** NETBIOS Datagram Service */
254     NETBIOS_DGM(138),
255 
256     /** NETBIOS Session Service */
257     NETBIOS_SSN(139),
258 
259     /** EMFIS Data Service */
260     EMFIS_DATA(140),
261 
262     /** EMFIS Control Service */
263     EMFIS_CNTL(141),
264 
265     /** Britton-Lee IDM */
266     BL_IDM(142),
267 
268     /** Survey Measurement */
269     SUR_MEAS(243),
270 
271     /** LINK */
272     LINK(245);
273 
274     private static ReverseEnumMap<Byte, ServiceType> map = new ReverseEnumMap<Byte, ServiceType>( ServiceType.class );
275 
276     private final byte value;
277 
278 
279     private ServiceType( int value )
280     {
281         this.value = ( byte ) value;
282     }
283 
284 
285     public Byte convert()
286     {
287         return this.value;
288     }
289 
290 
291     /**
292      * Converts an ordinal value into a {@link ServiceType}.
293      *
294      * @param value
295      * @return The {@link ServiceType}.
296      */
297     public static ServiceType convert( byte value )
298     {
299         return map.get( value );
300     }
301 }