KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > datashare > PersistDataQueueObject


1 /* ----- BEGIN LICENSE BLOCK -----
2  * Version: MPL 1.1
3  *
4  * The contents of this file are subject to the Mozilla Public License Version
5  * 1.1 (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  * http://www.mozilla.org/MPL/
8  *
9  * Software distributed under the License is distributed on an "AS IS" basis,
10  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11  * for the specific language governing rights and limitations under the
12  * License.
13  *
14  * The Original Code is the DataShare server.
15  *
16  * The Initial Developer of the Original Code is
17  * Ball Aerospace & Technologies Corp, Fairborn, Ohio
18  * Portions created by the Initial Developer are Copyright (C) 2001
19  * the Initial Developer. All Rights Reserved.
20  *
21  * Contributor(s): Charles Wood <cwood@ball.com>
22  *
23  * ----- END LICENSE BLOCK ----- */

24 /* RCS $Id: PersistDataQueueObject.java,v 1.1.1.1 2001/10/23 13:37:18 lizellaman Exp $
25  * $Log: PersistDataQueueObject.java,v $
26  * Revision 1.1.1.1 2001/10/23 13:37:18 lizellaman
27  * initial sourceforge release
28  *
29  */

30
31 package org.datashare;
32
33 import java.util.Hashtable JavaDoc;
34
35 /**
36  * Defines the object that will be put into our Queue and extracted by the PersistDataQueueConsumer
37  * class. This object fully describes the EJB that is to be created by the
38  * PersistDataQueueConsumer.
39  *
40  * @date March 01, 2001
41  * @author Charles Wood
42  * @version 1.0
43  */

44 public class PersistDataQueueObject
45    {
46    /**
47     * the name/type of the EJB to be created, should be the 'home' EJB class
48     *
49     */

50    String JavaDoc tableName = "";
51
52    /**
53     * describes the attributes of the EJB, determined by the EJB class that is to be created
54     * Contains attributes of the data, the keys are strings that correspond to fields,
55     * the values are the field values.
56     *
57     */

58    Hashtable JavaDoc props = new Hashtable JavaDoc();
59
60    /**
61     * should be set to the class that wishes to receive the ADSKey that corresponds
62     * to the EJB that is to be created, should be set to null if no callback with the
63     * ADSKey is desired
64     *
65     */

66    PersistDataCallbackInterface callback = null;
67
68    /**
69     * class constructor, must be created with first two parameters non-null
70     *
71     * @param beanName the name of the bean, used in the EjbUtil.create call
72     * @param props the property values that describe this bean, used in the
73     * call to EjbUtil.create
74     * @param callback provides the method that will let us return the ADSkey
75     * that corresponds to this EJB, set to null if no callback is desired
76     */

77    PersistDataQueueObject(String JavaDoc tableName, Hashtable JavaDoc props, PersistDataCallbackInterface callback)
78       {
79       this.tableName = tableName;
80       this.props = props;
81       this.callback = callback;
82       }
83
84    /**
85     * accessor for beanName of this instance
86     *
87     * @return the beanName that was provided to the class constructor
88     */

89    public String JavaDoc
90    getTableName()
91       {
92       return tableName;
93       }
94
95    /**
96     * accessor for the ADSProperties of this instance
97     *
98     * @return the ADSProperties that was provided to the class constructor
99     */

100    public Hashtable JavaDoc
101    getProperties()
102       {
103       return props;
104       }
105
106    /**
107     * returns the instance that was supplied to the consructor
108     *
109     * @return the instance supplied by the constructor parameter
110     */

111    public PersistDataCallbackInterface
112    getCallback()
113       {
114       return callback;
115       }
116    }
117
Popular Tags