1 23 package com.sun.enterprise.webservice; 24 25 import javax.xml.namespace.QName ; 26 import javax.xml.ws.handler.PortInfo; 27 28 31 public class PortInfoImpl implements PortInfo { 32 33 private String bindingId; 34 private QName portName; 35 private QName serviceName; 36 37 public PortInfoImpl(String bindingId, QName portName, QName serviceName) { 38 this.bindingId = bindingId; 39 this.portName = portName; 40 this.serviceName = serviceName; 41 } 42 43 public String getBindingID() { 44 return bindingId; 45 } 46 47 public QName getPortName() { 48 return portName; 49 } 50 51 public QName getServiceName() { 52 return serviceName; 53 } 54 55 public boolean equals(Object obj) { 56 if (obj instanceof PortInfo) { 57 PortInfo info = (PortInfo) obj; 58 if (bindingId.equals(info.getBindingID()) && 59 portName.equals(info.getPortName()) && 60 serviceName.equals(info.getServiceName())) { 61 return true; 62 } 63 } 64 return false; 65 } 66 67 public int hashCode() { 68 return bindingId.hashCode(); 69 } 70 } 71 | Popular Tags |