1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.juddi.datatype.binding;
17
18 import org.apache.juddi.datatype.BindingKey;
19 import org.apache.juddi.datatype.RegistryObject;
20
21 /***
22 * The HostingRedirector in the bindingTemplate is used to indicate that the
23 * bindingTemplate entry is a pointer to a different bindingTemplate entry.
24 * The value in this is seen when a business or entity wants to expose a
25 * service description (ie advertise a service that fulfills a specific
26 * purpose) that is actually a service that is described in a separate
27 * bindingTemplate record. This might occur when a service is remotely hosted
28 * or when many service descriptions could benefit from a single service
29 * description.
30 *
31 * @author Steve Viens (sviens@apache.org)
32 */
33 public class HostingRedirector implements RegistryObject
34 {
35
36 String bindingKey;
37
38 /***
39 * Constructs a new initialized HostingRedirector.
40 */
41 public HostingRedirector()
42 {
43 }
44
45 /***
46 * Constructs a new HostingRedirector with a given String.
47 *
48 * @param key The binding key.
49 */
50 public HostingRedirector(String key)
51 {
52 setBindingKey(key);
53 }
54
55 /***
56 * Sets the key of this HostingRedirector to the given key.
57 *
58 * @param key The new key of this HostingRedirector.
59 */
60 public void setBindingKey(BindingKey key)
61 {
62 if ((key != null) && (key.getValue() != null))
63 setBindingKey(key.getValue());
64 }
65
66 /***
67 * Sets the key of this HostingRedirector to the given key.
68 *
69 * @param key The new key of this HostingRedirector.
70 */
71 public void setBindingKey(String key)
72 {
73 this.bindingKey = key;
74 }
75
76 /***
77 * Returns the key of this HostingRedirector.
78 *
79 * @return The key of this HostingRedirector.
80 */
81 public String getBindingKey()
82 {
83 return this.bindingKey;
84 }
85 }