KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > wsif > providers > jca > WSIFMessage_JCA


1 /*
2  * The Apache Software License, Version 1.1
3  *
4  *
5  * Copyright (c) 2002 The Apache Software Foundation. All rights
6  * reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in
17  * the documentation and/or other materials provided with the
18  * distribution.
19  *
20  * 3. The end-user documentation included with the redistribution,
21  * if any, must include the following acknowledgment:
22  * "This product includes software developed by the
23  * Apache Software Foundation (http://www.apache.org/)."
24  * Alternately, this acknowledgment may appear in the software itself,
25  * if and wherever such third-party acknowledgments normally appear.
26  *
27  * 4. The names "WSIF" and "Apache Software Foundation" must
28  * not be used to endorse or promote products derived from this
29  * software without prior written permission. For written
30  * permission, please contact apache@apache.org.
31  *
32  * 5. Products derived from this software may not be called "Apache",
33  * nor may "Apache" appear in their name, without prior written
34  * permission of the Apache Software Foundation.
35  *
36  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39  * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
40  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
43  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47  * SUCH DAMAGE.
48  * ====================================================================
49  *
50  * This software consists of voluntary contributions made by many
51  * individuals on behalf of the Apache Software Foundation and was
52  * originally based on software copyright (c) 2001, 2002, International
53  * Business Machines, Inc., http://www.apache.org. For more
54  * information on the Apache Software Foundation, please see
55  * <http://www.apache.org/>.
56  */

57
58 package org.apache.wsif.providers.jca;
59
60 import javax.wsdl.*;
61
62 /**
63  * This class is the top level superclass for all JCA WSIF messages. It is extended by the connector specific messages,
64  * and implements the javax.resource.cci.Record interface.
65  *
66  * @author Michael Beisiegel
67  * @author Piotr Przybylski <piotrp@ca.ibm.com>
68  */

69
70 public class WSIFMessage_JCA extends org.apache.wsif.base.WSIFDefaultMessage implements javax.resource.cci.Record JavaDoc {
71
72     private static final long serialVersionUID = 1L;
73     public static final int INPUT_MESSAGE = 1;
74     public static final int OUTPUT_MESSAGE = 2;
75     public static final int FAULT_MESSAGE = 3;
76     
77     protected String JavaDoc fieldRecordName = null;
78     protected String JavaDoc fieldRecordShortDescription = null;
79
80     protected Definition fieldDefinition = null;
81     protected Binding fieldBinding = null;
82     protected String JavaDoc fieldOperationName = null;
83     protected String JavaDoc fieldInputName = null;
84     protected String JavaDoc fieldOutputName = null;
85     protected int fieldMessageType = 0;
86     protected javax.resource.cci.InteractionSpec JavaDoc fieldInteractionSpec = null;
87         
88     /**
89      * WSIFMessage_JCA Constructor
90      * @param aDefinition A Definition containing the operation to execute.
91      * @param aBinding A service binding
92      * @param aOperationName The name of the operation
93      * @param aInputName Input name
94      * @param aOutputName Output name
95      * @param aMessageType Determines what kind of message is created, input, output or fault.
96      */

97     public WSIFMessage_JCA(Definition aDefinition, Binding aBinding, String JavaDoc aOperationName, String JavaDoc aInputName, String JavaDoc aOutputName, int aMessageType) {
98         super();
99         this.fieldDefinition = aDefinition;
100         this.fieldBinding = aBinding;
101         this.fieldOperationName = aOperationName;
102         this.fieldInputName = aInputName;
103         this.fieldOutputName = aOutputName;
104         this.fieldMessageType = aMessageType;
105     }
106
107     /**
108      * Gets the recordName.
109      * @return Returns a String
110      */

111     public String JavaDoc getRecordName() {
112         return fieldRecordName;
113     }
114
115     /*
116      * @see Record#setRecordName(String)
117      */

118     public void setRecordName(String JavaDoc name) {
119         this.fieldRecordName = name;
120     }
121
122     /*
123      * @see Record#setRecordShortDescription(String)
124      */

125     public void setRecordShortDescription(String JavaDoc desription) {
126         this.fieldRecordShortDescription = desription;
127     }
128
129     /**
130      * Gets the recordShortDescription.
131      * @return Returns a String
132      */

133     public String JavaDoc getRecordShortDescription() {
134         return fieldRecordShortDescription;
135     }
136
137     /**
138      * Method not supported.
139      */

140     public Object JavaDoc clone()throws CloneNotSupportedException JavaDoc{
141         throw new CloneNotSupportedException JavaDoc();
142     }
143     /**
144      * Sets the interactionSpec.
145      * @param interactionSpec The interactionSpec to set
146      */

147     public void setInteractionSpec(javax.resource.cci.InteractionSpec JavaDoc interactionSpec) {
148         fieldInteractionSpec = interactionSpec;
149     }
150
151 }
Popular Tags