KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > deployment > types > MessageDestinationReferencer


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package com.sun.enterprise.deployment.types;
25
26 import com.sun.enterprise.deployment.MessageDestinationDescriptor;
27 import com.sun.enterprise.deployment.MessageDestinationReferenceDescriptor;
28 import com.sun.enterprise.deployment.EjbMessageBeanDescriptor;
29 import com.sun.enterprise.deployment.Descriptor;
30
31 /**
32  *
33  *
34  * @author Kenneth Saks
35  */

36
37 public interface MessageDestinationReferencer {
38
39     /**
40      * @return true if this referencer is linked to a message destination
41      * and false otherwise.
42      */

43     public boolean isLinkedToMessageDestination();
44
45     /**
46      * Gets the link name of the reference. Points to the associated
47      * message destination within the J2EE application. Can be NULL
48      * if link is not set.
49      * @return the link name.
50      */

51     public String JavaDoc getMessageDestinationLinkName();
52
53     /**
54      * Sets the link name of the reference. Points to the associated
55      * message destination within the J2EE application. Can be NULL
56      * if link is not set.
57      * @param the link name.
58      */

59     public void setMessageDestinationLinkName(String JavaDoc linkName);
60     
61     /**
62      * Sets the name of the message destination to which I refer.
63      * @param resolve if true, *try* to resolve link to the target message
64      * destination.
65      *
66      * @return MessageDestination to which link was resolved, or null if
67      * link name resolution failed.
68      */

69     public MessageDestinationDescriptor setMessageDestinationLinkName
70         (String JavaDoc linkName, boolean resolve);
71
72     /**
73      * Try to resolve the current link name value to a MessageDestination
74      * object.
75      *
76      * @return MessageDestination to which link was resolved, or null if
77      * link name resolution failed.
78      */

79     public MessageDestinationDescriptor resolveLinkName();
80
81     /**
82      * @return the message destination object to which this message destination
83      * ref is linked. Can be NULL.
84      */

85     public MessageDestinationDescriptor getMessageDestination();
86
87     /**
88      * @param destination set the message destination object to which this
89      * message destination ref is linked. Can be NULL.
90      *
91      */

92     public void setMessageDestination(MessageDestinationDescriptor destination);
93
94     /**
95      * True if the owner is a message destination reference.
96      */

97     public boolean ownedByMessageDestinationRef();
98
99     /**
100      * Get the descriptor for the message destination reference owner.
101      */

102     public MessageDestinationReferenceDescriptor getMessageDestinationRefOwner
103         ();
104
105     /**
106      * True if the owner is a message-driven bean.
107      */

108     public boolean ownedByMessageBean();
109
110     /**
111      * Get the descriptor for the message-driven bean owner.
112      */

113     public EjbMessageBeanDescriptor getMessageBeanOwner();
114
115 }
116
117
Popular Tags