com.esri.arcgis.gisclient
Class WMSConnection

java.lang.Object
  extended by com.esri.arcgis.gisclient.WMSConnection
All Implemented Interfaces:
IWMSConnection, IWMSServiceDescription, com.esri.arcgis.interop.RemoteObjRef, ISupportErrorInfo, Serializable

public class WMSConnection
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IWMSConnection, IWMSServiceDescription, ISupportErrorInfo

The Connection for WMS.

Remarks

A WMSConnection is a representation of WMS service capabilities. These capabilities are to populate and manage the layers of the WMS service. You can access the service capabilities using IWMSServiceDescription. You can access individual layer capabilities from IWMSLayerDescription.

A WMSConnection is the result of OpenEx (IWMSConnectionName) or Open (IWMSConnectionFactory).

WMSConnection is the source of IWMSClientEvents. You can listen to requests or exceptions on a particular WMS connection using this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
Serialized Form

Constructor Summary
WMSConnection()
          Constructs a WMSConnection using ArcGIS Engine.
WMSConnection(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
WMSConnection theWMSConnection = (WMSConnection) obj;
 
Method Summary
 void addIWMSClientEventsListener(IWMSClientEvents theListener)
          addIWMSClientEventsListener.
 boolean equals(Object o)
          Compare this object with another
 void fireWMSException(String requestType, String requestURL, IWMSServiceExceptionHandler pException)
          Notifies listeners about a valid exception from the WMS Service.
 void fireWMSRequest(String requestType, String requestURL)
          Notifies listeners about the URL request made to this WMS Service.
 String getBaseURL(String capability, String requestMethod)
          Base url for given capability and request method.
static String getClsid()
          getClsid.
 String getExceptionFormat(int index)
          Supported exception at the given index.
 int getExceptionFormatCount()
          Supported exception format count.
 String getFeatureInfoFormat(int index)
          Supported FeatureInfoFormat at the given index.
 int getFeatureInfoFormatCount()
          Supported FeatureInfoFormat count.
 String getFeatureInfoRequestURL(IArray pLayers, IEnvelope pBoundingBox, int imageWidth, int imageHeight, int positionX, int positionY, int featureCount, String responseFormat)
          The url to download the feature info from.
 IName getFullName()
          Complete information required to connect to a WMS server..
 String getImageFormat(int index)
          Supported GetMap's ImageFormat at the given index.
 int getImageFormatCount()
          Supported GetMap's ImageFormat count.
 String getImageRequestUrl(IArray pLayers, IEnvelope pBoundingBox, int imageWidth, int imageHeight, int bgColor, String responseFormat, boolean drawTransparent)
          The URL to download the map image from.
 IWMSLayerDescription getLayerDescription(int index)
          WMS layer information at the given index.
 int getLayerDescriptionCount()
          WMS layer count.
 String getName()
          Name of the connection.
 String getSRS(int index)
          Supported SRS at the given index.
 int getSRSCount()
          Supported SRS count.
 String getWMSAbstract()
          Abstract of WMS Service.
 String getWMSName()
          Name of WMS Service.
 String getWMSTitle()
          Title of WMS Service.
 String getWMSVersion()
          Version of WMS Service.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 void removeIWMSClientEventsListener(IWMSClientEvents theListener)
          removeIWMSClientEventsListener.
 void setFullNameByRef(IName ppName)
          Complete information required to connect to a WMS server..
 void setName(String name)
          Name of the connection.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

WMSConnection

public WMSConnection()
              throws IOException,
                     UnknownHostException
Constructs a WMSConnection using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

WMSConnection

public WMSConnection(Object obj)
              throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
WMSConnection theWMSConnection = (WMSConnection) obj;

Construct a WMSConnection using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to WMSConnection.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

addIWMSClientEventsListener

public void addIWMSClientEventsListener(IWMSClientEvents theListener)
                                 throws IOException
addIWMSClientEventsListener. Listen to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.gisclient.IWMSClientEvents interface.
Throws:
IOException - If there are communications problems.

removeIWMSClientEventsListener

public void removeIWMSClientEventsListener(IWMSClientEvents theListener)
                                    throws IOException
removeIWMSClientEventsListener. Stop listening to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.gisclient.IWMSClientEvents interface.
Throws:
IOException - If there are communications problems.

getName

public String getName()
               throws IOException,
                      AutomationException
Name of the connection.

Remarks

FullName is name object. You can access the connection properties for the WMS service using FullName.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getName in interface IWMSConnection
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setName

public void setName(String name)
             throws IOException,
                    AutomationException
Name of the connection.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setName in interface IWMSConnection
Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFullName

public IName getFullName()
                  throws IOException,
                         AutomationException
Complete information required to connect to a WMS server..

Remarks

Name is descriptive string for the connection.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getFullName in interface IWMSConnection
Returns:
A reference to a com.esri.arcgis.system.IName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFullNameByRef

public void setFullNameByRef(IName ppName)
                      throws IOException,
                             AutomationException
Complete information required to connect to a WMS server..

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
setFullNameByRef in interface IWMSConnection
Parameters:
ppName - A reference to a com.esri.arcgis.system.IName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWMSName

public String getWMSName()
                  throws IOException,
                         AutomationException
Name of WMS Service.

Remarks

Name is text used to identify a WMS service for machine-to-machine communication.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getWMSName in interface IWMSServiceDescription
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWMSAbstract

public String getWMSAbstract()
                      throws IOException,
                             AutomationException
Abstract of WMS Service.

Remarks

The abstract is a narrative description of the WMS service.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getWMSAbstract in interface IWMSServiceDescription
Returns:
The esri_abstract
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWMSTitle

public String getWMSTitle()
                   throws IOException,
                          AutomationException
Title of WMS Service.

Remarks

Title is the user-friendly text used to identify a WMS service.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getWMSTitle in interface IWMSServiceDescription
Returns:
The title
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWMSVersion

public String getWMSVersion()
                     throws IOException,
                            AutomationException
Version of WMS Service.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getWMSVersion in interface IWMSServiceDescription
Returns:
The title
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayerDescriptionCount

public int getLayerDescriptionCount()
                             throws IOException,
                                    AutomationException
WMS layer count.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getLayerDescriptionCount in interface IWMSServiceDescription
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayerDescription

public IWMSLayerDescription getLayerDescription(int index)
                                         throws IOException,
                                                AutomationException
WMS layer information at the given index.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getLayerDescription in interface IWMSServiceDescription
Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.gisclient.IWMSLayerDescription
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSRSCount

public int getSRSCount()
                throws IOException,
                       AutomationException
Supported SRS count.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getSRSCount in interface IWMSServiceDescription
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSRS

public String getSRS(int index)
              throws IOException,
                     AutomationException
Supported SRS at the given index.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getSRS in interface IWMSServiceDescription
Parameters:
index - The index (in)
Returns:
The sRS
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getImageRequestUrl

public String getImageRequestUrl(IArray pLayers,
                                 IEnvelope pBoundingBox,
                                 int imageWidth,
                                 int imageHeight,
                                 int bgColor,
                                 String responseFormat,
                                 boolean drawTransparent)
                          throws IOException,
                                 AutomationException
The URL to download the map image from.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getImageRequestUrl in interface IWMSServiceDescription
Parameters:
pLayers - A reference to a com.esri.arcgis.system.IArray (in)
pBoundingBox - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
imageWidth - The imageWidth (in)
imageHeight - The imageHeight (in)
bgColor - The bgColor (A COM typedef) (in)
responseFormat - The responseFormat (in)
drawTransparent - The drawTransparent (in)
Returns:
The uRL
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFeatureInfoRequestURL

public String getFeatureInfoRequestURL(IArray pLayers,
                                       IEnvelope pBoundingBox,
                                       int imageWidth,
                                       int imageHeight,
                                       int positionX,
                                       int positionY,
                                       int featureCount,
                                       String responseFormat)
                                throws IOException,
                                       AutomationException
The url to download the feature info from.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getFeatureInfoRequestURL in interface IWMSServiceDescription
Parameters:
pLayers - A reference to a com.esri.arcgis.system.IArray (in)
pBoundingBox - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
imageWidth - The imageWidth (in)
imageHeight - The imageHeight (in)
positionX - The positionX (in)
positionY - The positionY (in)
featureCount - The featureCount (in)
responseFormat - The responseFormat (in)
Returns:
The uRL
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getImageFormatCount

public int getImageFormatCount()
                        throws IOException,
                               AutomationException
Supported GetMap's ImageFormat count.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getImageFormatCount in interface IWMSServiceDescription
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getImageFormat

public String getImageFormat(int index)
                      throws IOException,
                             AutomationException
Supported GetMap's ImageFormat at the given index.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getImageFormat in interface IWMSServiceDescription
Parameters:
index - The index (in)
Returns:
The imageFormat
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFeatureInfoFormatCount

public int getFeatureInfoFormatCount()
                              throws IOException,
                                     AutomationException
Supported FeatureInfoFormat count.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getFeatureInfoFormatCount in interface IWMSServiceDescription
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFeatureInfoFormat

public String getFeatureInfoFormat(int index)
                            throws IOException,
                                   AutomationException
Supported FeatureInfoFormat at the given index.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getFeatureInfoFormat in interface IWMSServiceDescription
Parameters:
index - The index (in)
Returns:
The imageFormat
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExceptionFormatCount

public int getExceptionFormatCount()
                            throws IOException,
                                   AutomationException
Supported exception format count.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getExceptionFormatCount in interface IWMSServiceDescription
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExceptionFormat

public String getExceptionFormat(int index)
                          throws IOException,
                                 AutomationException
Supported exception at the given index.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getExceptionFormat in interface IWMSServiceDescription
Parameters:
index - The index (in)
Returns:
The exceptionFormat
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBaseURL

public String getBaseURL(String capability,
                         String requestMethod)
                  throws IOException,
                         AutomationException
Base url for given capability and request method.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
getBaseURL in interface IWMSServiceDescription
Parameters:
capability - The capability (in)
requestMethod - The requestMethod (in)
Returns:
The baseURL
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

fireWMSRequest

public void fireWMSRequest(String requestType,
                           String requestURL)
                    throws IOException,
                           AutomationException
Notifies listeners about the URL request made to this WMS Service.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
fireWMSRequest in interface IWMSServiceDescription
Parameters:
requestType - The requestType (in)
requestURL - The requestURL (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

fireWMSException

public void fireWMSException(String requestType,
                             String requestURL,
                             IWMSServiceExceptionHandler pException)
                      throws IOException,
                             AutomationException
Notifies listeners about a valid exception from the WMS Service.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
fireWMSException in interface IWMSServiceDescription
Parameters:
requestType - The requestType (in)
requestURL - The requestURL (in)
pException - A reference to a com.esri.arcgis.gisclient.IWMSServiceExceptionHandler (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Description

Indicates whether the interface supports IErrorInfo.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.