View Javadoc
1   /*
2    * Copyright 2001-2011 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    *      http://www.apache.org/licenses/LICENSE-2.0
8    * 
9    * Unless required by applicable law or agreed to in writing, software
10   * distributed under the License is distributed on an "AS IS" BASIS,
11   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   * See the License for the specific language governing permissions and
13   * limitations under the License.
14   */
15  package org.apache.juddi.v3.client.mapping;
16  
17  import java.io.Serializable;
18  import java.util.List;
19  
20  /**
21   * Data structure to store a list of Endpoint References (ERPs). 
22   * Given a certain Policy an EPR is selected from the list.
23   * The Policy implementation can use the Pointer to keep track
24   * of which EPR was used last.
25   * 
26   * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
27   */
28  public class Topology implements Serializable{
29  	
30  	public Topology(List<String> eprs) {
31  		super();
32  		this.eprs = eprs;
33  	}
34  	private static final long serialVersionUID = 3884817160534937195L;
35  	/** List of Endpoint References (EPRs) for a certain service Key */
36  	private List<String> eprs;
37  	/** pointer to the last selected EPR from the list */
38  	private int pointer = 0;
39  	/** can be set by a policy if for instance local first is important */
40  	private Boolean hasLocal = null;
41  	
42  	
43  	public Boolean getHasLocal() {
44  		return hasLocal;
45  	}
46  	public void setHasLocal(Boolean hasLocal) {
47  		this.hasLocal = hasLocal;
48  	}
49  	public List<String> getEprs() {
50  		return eprs;
51  	}
52  	public void setEprs(List<String> eprs) {
53  		this.eprs = eprs;
54  	}
55  	public int getPointer() {
56  		return pointer;
57  	}
58  	public void setPointer(int pointer) {
59  		this.pointer = pointer;
60  	}
61  }