View Javadoc

1   /*
2    * Copyright  2004 The Apache Software Foundation.
3    *
4    *  Licensed under the Apache License, Version 2.0 (the "License");
5    *  you may not use this file except in compliance with the License.
6    *  You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *  Unless required by applicable law or agreed to in writing, software
11   *  distributed under the License is distributed on an "AS IS" BASIS,
12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *  See the License for the specific language governing permissions and
14   *  limitations under the License.
15   *
16   */
17  package org.apache.kandula.coordinator.at;
18  
19  import org.apache.axis2.addressing.EndpointReference;
20  
21  /***
22   * *
23   * 
24   * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
25   */
26  /***
27   * <p/> Used to store the details about the participant & to store the runtime
28   * status of Participants in the coordinator.
29   */
30  
31  public class ATParticipantInformation {
32  
33  	private String enlistmentId;
34  
35  	private EndpointReference epr;
36  
37  	private String protocol;
38  
39  	private int status;
40  
41  	/***
42  	 * @param epr
43  	 * @param protocol
44  	 * @param enlistmentId
45  	 */
46  	public ATParticipantInformation(EndpointReference epr, String protocol,
47  			String enlistmentId) {
48  		super();
49  		this.epr = epr;
50  		this.protocol = protocol;
51  		this.enlistmentId = enlistmentId;
52  	}
53  
54  	/***
55  	 * @return Returns the Id which this participant is registered with the
56  	 *         coordinator
57  	 */
58  	public String getEnlistmentId() {
59  		return enlistmentId;
60  	}
61  
62  	/***
63  	 * @return Returns the epr of the participant
64  	 */
65  	public EndpointReference getEpr() {
66  		return epr;
67  	}
68  
69  	/***
70  	 * @return Returns the protocol of the participant (Eg: WS-AT, WS-BA)
71  	 */
72  	public String getProtocol() {
73  		return protocol;
74  	}
75  
76  	/***
77  	 * @return Returns the status of the participant
78  	 */
79  	public int getStatus() {
80  		return status;
81  	}
82  
83  	public void setEpr(EndpointReference epr) {
84  		this.epr = epr;
85  	}
86  
87  	public void setStatus(int status) {
88  		this.status = status;
89  	}
90  }