KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > components > uuid > UUIDGenFactory


1 /*
2  * Copyright 2001-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 /**
18  *
19  * UUIDGen adopted from the juddi project
20  * (http://sourceforge.net/projects/juddi/)
21  *
22  */

23 package org.apache.axis.components.uuid;
24
25 import org.apache.axis.AxisProperties;
26 import org.apache.axis.components.logger.LogFactory;
27 import org.apache.commons.logging.Log;
28
29 /**
30  * A Universally Unique Identifier (UUID) is a 128 bit number generated
31  * according to an algorithm that is garanteed to be unique in time and space
32  * from all other UUIDs. It consists of an IEEE 802 Internet Address and
33  * various time stamps to ensure uniqueness. For a complete specification,
34  * see ftp://ietf.org/internet-drafts/draft-leach-uuids-guids-01.txt [leach].
35  *
36  * @author Steve Viens
37  * @version 1.0 11/7/2000
38  * @since JDK1.2.2
39  */

40 public abstract class UUIDGenFactory {
41     protected static Log log = LogFactory.getLog(UUIDGenFactory.class.getName());
42
43     static {
44         AxisProperties.setClassOverrideProperty(UUIDGen.class, "axis.UUIDGenerator");
45         AxisProperties.setClassDefault(UUIDGen.class, "org.apache.axis.components.uuid.FastUUIDGen");
46     }
47
48     /**
49      * Returns an instance of UUIDGen
50      */

51     public static UUIDGen getUUIDGen() {
52         UUIDGen uuidgen = (UUIDGen) AxisProperties.newInstance(UUIDGen.class);
53         log.debug("axis.UUIDGenerator:" + uuidgen.getClass().getName());
54         return uuidgen;
55     }
56 }
57
Popular Tags