01: /*
02: * <copyright>
03: *
04: * Copyright 1997-2004 BBNT Solutions, LLC
05: * under sponsorship of the Defense Advanced Research Projects
06: * Agency (DARPA).
07: *
08: * You can redistribute this software and/or modify it under the
09: * terms of the Cougaar Open Source License as published on the
10: * Cougaar Open Source Website (www.cougaar.org).
11: *
12: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
13: * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
14: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
15: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
16: * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
18: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22: * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23: *
24: * </copyright>
25: */
26:
27: package org.cougaar.core.qos.ca;
28:
29: import java.util.Properties;
30:
31: /**
32: * This simple struct provides a specification for a role in
33: * particular {@link CoordinationArtifact}. It's used by {@link
34: * RolePlayer}s to get themselves connected.
35: */
36: public class ConnectionSpec {
37: /**
38: * The Coordination Artifact kind. Each kind has one or more
39: * roles, and each role is visible to clients as a 'facet'. The
40: * specific role for any particular Connection spec is given in
41: * the 'role' instance variable.
42: */
43: public String ca_kind;
44:
45: /**
46: * The specific role for the given Coordination Artifact kind.
47: */
48: public String role;
49:
50: /**
51: * A plist that can distinguish the instances of the given
52: * Coordination Artifact kind from one another.
53: */
54: public Properties ca_parameters;
55:
56: /**
57: * A plist includes all the instance-specific data for a
58: * particular Facet instance.
59: */
60: public Properties role_parameters;
61:
62: public ConnectionSpec(String ca_kind, Properties ca_parameters,
63: String role, Properties role_parameters)
64:
65: {
66: this .ca_kind = ca_kind;
67: this .ca_parameters = ca_parameters;
68: this .role = role;
69: this .role_parameters = role_parameters;
70: }
71:
72: public String logString() {
73: return "<CA Spec " + ca_kind + ":" + role + ">";
74: }
75: }
|