KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > lutris > airsent > spec > delivery > DeliveryManagerFactory


1 /*
2  * Copyright (c) 1999-2001 Lutris Technologies, Inc. All Rights
3  * Reserved.
4  *
5  * This source code file is distributed by Lutris Technologies, Inc. for
6  * use only by licensed users of product(s) that include this source
7  * file. Use of this source file or the software that uses it is covered
8  * by the terms and conditions of the Lutris Enhydra Development License
9  * Agreement included with this product.
10  *
11  * This Software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
12  * ANY KIND, either express or implied. See the License for the specific terms
13  * governing rights and limitations under the License.
14  *
15  * Contributor(s):
16  *
17  * $Id: DeliveryManagerFactory.java,v 1.1 2004/05/19 18:15:19
18  */

19 package com.lutris.airsent.spec.delivery;
20
21
22 public class DeliveryManagerFactory {
23     
24     /**
25      * Constructor can't be used.
26      */

27     private DeliveryManagerFactory() {
28     }
29
30     /**
31      * Create a DeliveryManager as state object/value object/data transfer object
32      */

33     public static DeliveryManager getDeliveryManager(String JavaDoc fullClassName) {
34         
35         DeliveryManager result = null;
36        
37         Class JavaDoc objectClass = null;
38
39         try {
40             // Create the value object
41

42       
43          objectClass = Class.forName(fullClassName);
44                                    
45           result = (DeliveryManager)objectClass.newInstance();
46                             
47        } catch (Exception JavaDoc ex) {
48             System.out.println("Error on creating the object" + ex);
49        }
50
51         return result;
52     }
53     
54      
55     
56     
57     
58     
59     
60     
61 }
Popular Tags