com.sun.xml.ws.handler
Class PortInfoImpl

java.lang.Object
  extended by com.sun.xml.ws.handler.PortInfoImpl
All Implemented Interfaces:
javax.xml.ws.handler.PortInfo

public class PortInfoImpl
extends java.lang.Object
implements javax.xml.ws.handler.PortInfo

Implementation of the PortInfo interface. This is just a simple class used to hold the info necessary to uniquely identify a port, including the port name, service name, and binding ID. This class is only used on the client side.

An instance is created by WSServiceDelegate when used to place a handler chain into the HandlerResolver map. Another is created later by WSServiceDelegate to retrieve the necessary handler chain to set on a binding instance.

See Also:
WSServiceDelegate, com.sun.xml.ws.client.HandlerResolverImpl

Constructor Summary
PortInfoImpl(BindingID bindingId, javax.xml.namespace.QName portName, javax.xml.namespace.QName serviceName)
          The class is constructed with the information needed to identify a port.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Object.equals is overridden here so that PortInfo objects can be compared when using them as keys in the map in HandlerResolverImpl.
 java.lang.String getBindingID()
           
 javax.xml.namespace.QName getPortName()
           
 javax.xml.namespace.QName getServiceName()
           
 int hashCode()
          Needed so PortInfoImpl can be used as a key in a map.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortInfoImpl

public PortInfoImpl(BindingID bindingId,
                    javax.xml.namespace.QName portName,
                    javax.xml.namespace.QName serviceName)
The class is constructed with the information needed to identify a port. This information cannot be changed later.

Parameters:
bindingId - The binding ID string.
portName - The QName of the port.
serviceName - The QName of the service.
Method Detail

getBindingID

public java.lang.String getBindingID()
Specified by:
getBindingID in interface javax.xml.ws.handler.PortInfo

getPortName

public javax.xml.namespace.QName getPortName()
Specified by:
getPortName in interface javax.xml.ws.handler.PortInfo

getServiceName

public javax.xml.namespace.QName getServiceName()
Specified by:
getServiceName in interface javax.xml.ws.handler.PortInfo

equals

public boolean equals(java.lang.Object obj)
Object.equals is overridden here so that PortInfo objects can be compared when using them as keys in the map in HandlerResolverImpl. This method relies on the equals() methods of java.lang.String and javax.xml.namespace.QName.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The PortInfo object to test for equality.
Returns:
True if they match, and false if they do not or if the object passed in is not a PortInfo.

hashCode

public int hashCode()
Needed so PortInfoImpl can be used as a key in a map. This method just delegates to the hashCode method of java.lang.String.

Overrides:
hashCode in class java.lang.Object


Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.