01: /**
02: * $Id: PortDescriptorImpl.java,v 1.5 2003/06/03 10:49:24 sy131129 Exp $
03: * Copyright 2002-2003 Sun Microsystems, Inc. All
04: * rights reserved. Use of this product is subject
05: * to license terms. Federal Acquisitions:
06: * Commercial Software -- Government Users
07: * Subject to Standard License Terms and
08: * Conditions.
09: *
10: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
11: * are trademarks or registered trademarks of Sun Microsystems,
12: * Inc. in the United States and other countries.
13: */package com.sun.portal.providers.simplewebservice.wsdl.impl;
14:
15: import com.sun.portal.providers.simplewebservice.wsdl.PortDescriptor;
16:
17: /**
18: * This class represents a port, an endpoint for the
19: * functionality described by a particular port type.
20: *
21: */
22: public class PortDescriptorImpl implements PortDescriptor {
23: private String name = null;
24: private String bindingDescriptorName = null;
25: private String soapAddressLocation = null;
26:
27: public PortDescriptorImpl(String name,
28: String bindingDescriptorName, String soapAddressLocation) {
29: this .name = name;
30: this .bindingDescriptorName = bindingDescriptorName;
31: this .soapAddressLocation = soapAddressLocation;
32: }
33:
34: /**
35: * Get the name of this port.
36: *
37: * @return the port name
38: */
39: public String getName() {
40: return name;
41: }
42:
43: /**
44: * Get the name of the BindingDescriptor this port refers to.
45: *
46: * @return the name of the BindingDescriptor associated with this port
47: */
48: public String getBindingDescriptorName() {
49: return bindingDescriptorName;
50: }
51:
52: /**
53: * Get the SOAP Address location for this port.
54: *
55: * @return the SOAP Address location for this port.
56: */
57: public String getSOAPAddressLocation() {
58: return soapAddressLocation;
59: }
60:
61: /**
62: * Get the String representation of this PortDescriptor.
63: *
64: * @return the String representation of this PortDescriptor.
65: */
66: public String toString() {
67: StringBuffer strBuf = new StringBuffer();
68:
69: strBuf.append("\nPortDescriptor: name=" + name);
70:
71: if (bindingDescriptorName != null) {
72: strBuf.append("\nBindingDescriptor name:"
73: + bindingDescriptorName);
74: }
75:
76: if (soapAddressLocation != null) {
77: strBuf.append("\nSOAP Address Location:"
78: + soapAddressLocation);
79: }
80:
81: return strBuf.toString();
82: }
83: }
|