001: /* ----- BEGIN LICENSE BLOCK -----
002: * Version: MPL 1.1
003: *
004: * The contents of this file are subject to the Mozilla Public License Version
005: * 1.1 (the "License"); you may not use this file except in compliance with
006: * the License. You may obtain a copy of the License at
007: * http://www.mozilla.org/MPL/
008: *
009: * Software distributed under the License is distributed on an "AS IS" basis,
010: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
011: * for the specific language governing rights and limitations under the
012: * License.
013: *
014: * The Original Code is the DataShare server.
015: *
016: * The Initial Developer of the Original Code is
017: * Ball Aerospace & Technologies Corp, Fairborn, Ohio
018: * Portions created by the Initial Developer are Copyright (C) 2001
019: * the Initial Developer. All Rights Reserved.
020: *
021: * Contributor(s): Charles Wood <cwood@ball.com>
022: *
023: * ----- END LICENSE BLOCK ----- */
024: /* RCS $Id: PersistDataQueueObject.java,v 1.1.1.1 2001/10/23 13:37:18 lizellaman Exp $
025: * $Log: PersistDataQueueObject.java,v $
026: * Revision 1.1.1.1 2001/10/23 13:37:18 lizellaman
027: * initial sourceforge release
028: *
029: */
030:
031: package org.datashare;
032:
033: import java.util.Hashtable;
034:
035: /**
036: * Defines the object that will be put into our Queue and extracted by the PersistDataQueueConsumer
037: * class. This object fully describes the EJB that is to be created by the
038: * PersistDataQueueConsumer.
039: *
040: * @date March 01, 2001
041: * @author Charles Wood
042: * @version 1.0
043: */
044: public class PersistDataQueueObject {
045: /**
046: * the name/type of the EJB to be created, should be the 'home' EJB class
047: *
048: */
049: String tableName = "";
050:
051: /**
052: * describes the attributes of the EJB, determined by the EJB class that is to be created
053: * Contains attributes of the data, the keys are strings that correspond to fields,
054: * the values are the field values.
055: *
056: */
057: Hashtable props = new Hashtable();
058:
059: /**
060: * should be set to the class that wishes to receive the ADSKey that corresponds
061: * to the EJB that is to be created, should be set to null if no callback with the
062: * ADSKey is desired
063: *
064: */
065: PersistDataCallbackInterface callback = null;
066:
067: /**
068: * class constructor, must be created with first two parameters non-null
069: *
070: * @param beanName the name of the bean, used in the EjbUtil.create call
071: * @param props the property values that describe this bean, used in the
072: * call to EjbUtil.create
073: * @param callback provides the method that will let us return the ADSkey
074: * that corresponds to this EJB, set to null if no callback is desired
075: */
076: PersistDataQueueObject(String tableName, Hashtable props,
077: PersistDataCallbackInterface callback) {
078: this .tableName = tableName;
079: this .props = props;
080: this .callback = callback;
081: }
082:
083: /**
084: * accessor for beanName of this instance
085: *
086: * @return the beanName that was provided to the class constructor
087: */
088: public String getTableName() {
089: return tableName;
090: }
091:
092: /**
093: * accessor for the ADSProperties of this instance
094: *
095: * @return the ADSProperties that was provided to the class constructor
096: */
097: public Hashtable getProperties() {
098: return props;
099: }
100:
101: /**
102: * returns the instance that was supplied to the consructor
103: *
104: * @return the instance supplied by the constructor parameter
105: */
106: public PersistDataCallbackInterface getCallback() {
107: return callback;
108: }
109: }
|