com.esri.arcgis.carto
Class WMSServer

java.lang.Object
  extended bycom.esri.arcgis.carto.WMSServer
All Implemented Interfaces:
ILogSupport, IObjectActivate, IObjectConstruct, IServerObjectExtension, IWMSServer, java.io.Serializable

public class WMSServer
extends java.lang.Object
implements IServerObjectExtension, IObjectConstruct, IObjectActivate, ILogSupport, IWMSServer

The WMS Server Object Extension.

Product Availability

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

Description

The Class represents the WMS Server Object Extension

See Also:
Serialized Form

Constructor Summary
WMSServer()
          Constructs a WMSServer using ArcGIS Engine.
WMSServer(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
 
Method Summary
 void activate()
          Activates the object.
 void construct(IPropertySet props)
          Two phase object construction.
 void deactivate()
          Deactivates the object.
 boolean equals(java.lang.Object o)
          Compare this object with another
 ILogSupport getAsILogSupport()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IObjectActivate getAsIObjectActivate()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IObjectConstruct getAsIObjectConstruct()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IServerObjectExtension getAsIServerObjectExtension()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IWMSServer getAsIWMSServer()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
static java.lang.String getClsid()
           
 byte[] getData(java.lang.String capabilities, java.lang.String request, java.lang.String[] pMimeType)
          Handle WMS Server binary request.
 java.lang.String getToPost(java.lang.String sGet)
          Handle translation from Get to Post.
 int hashCode()
          the hashcode for this object
 void init(IServerObjectHelper pSOH)
          Initializes and starts the server object specified by the IServerObjectHelper reference.
 void initLogging(ILog log)
          Initializes an object with a log.
 void setParameters(java.lang.String name, java.lang.String value)
          Handle setting WMS Server parameters.
 void shutdown()
          Stops the server object specified by the IServerObjectHelper reference.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WMSServer

public WMSServer()
          throws java.io.IOException,
                 java.net.UnknownHostException
Constructs a WMSServer using ArcGIS Engine.

Throws:
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems

WMSServer

public WMSServer(java.lang.Object obj)
          throws java.io.IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.

Construct a WMSServer using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to WMSServer.
WMSServer theWMSServer = (WMSServer) obj;

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

getClsid

public static java.lang.String getClsid()

getAsIServerObjectExtension

public IServerObjectExtension getAsIServerObjectExtension()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIObjectConstruct

public IObjectConstruct getAsIObjectConstruct()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIObjectActivate

public IObjectActivate getAsIObjectActivate()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsILogSupport

public ILogSupport getAsILogSupport()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIWMSServer

public IWMSServer getAsIWMSServer()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


equals

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


hashCode

public int hashCode()
the hashcode for this object


init

public void init(IServerObjectHelper pSOH)
          throws java.io.IOException,
                 AutomationException
Description copied from interface: IServerObjectExtension
Initializes and starts the server object specified by the IServerObjectHelper reference.

Specified by:
init in interface IServerObjectExtension
Parameters:
pSOH - A reference to a com.esri.arcgis.server.IServerObjectHelper (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

shutdown

public void shutdown()
              throws java.io.IOException,
                     AutomationException
Description copied from interface: IServerObjectExtension
Stops the server object specified by the IServerObjectHelper reference.

Specified by:
shutdown in interface IServerObjectExtension
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

construct

public void construct(IPropertySet props)
               throws java.io.IOException,
                      AutomationException
Description copied from interface: IObjectConstruct
Two phase object construction.

Supported Platforms

Windows, Solaris, Linux

Specified by:
construct in interface IObjectConstruct
Parameters:
props - A reference to a com.esri.arcgis.system.IPropertySet (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

activate

public void activate()
              throws java.io.IOException,
                     AutomationException
Description copied from interface: IObjectActivate
Activates the object.

Supported Platforms

Windows, Solaris, Linux

Specified by:
activate in interface IObjectActivate
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deactivate

public void deactivate()
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IObjectActivate
Deactivates the object.

Supported Platforms

Windows, Solaris, Linux

Specified by:
deactivate in interface IObjectActivate
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

initLogging

public void initLogging(ILog log)
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: ILogSupport
Initializes an object with a log.

Supported Platforms

Windows, Solaris, Linux

Specified by:
initLogging in interface ILogSupport
Parameters:
log - A reference to a com.esri.arcgis.system.ILog (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getToPost

public java.lang.String getToPost(java.lang.String sGet)
                           throws java.io.IOException,
                                  AutomationException
Description copied from interface: IWMSServer
Handle translation from Get to Post.

Description

Convert a WMS request string (query string used in WMS HTTP GET request mode) to an WMS request XML (XML used in WMS HTTP POST request mode) 

Remarks

According to OGC WMS Implementation Specification, A WMS Server should be able to accept WMS request in both HTTP GET (requests are WMS URL appended by key-value pairs) mode and HTTP Post mode (requests are XML whose DTD or shchema are defined in WMS Specification). To simplify the logic of WMS Server Object Extension, all WMS requests will be converted to XML before they reach the server object, so method GetToPost() is used whenever a WMS request in HTTP GET mode is received.

Specified by:
getToPost in interface IWMSServer
Parameters:
sGet - The sGet (in)
Returns:
The pPost
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getData

public byte[] getData(java.lang.String capabilities,
                      java.lang.String request,
                      java.lang.String[] pMimeType)
               throws java.io.IOException,
                      AutomationException
Description copied from interface: IWMSServer
Handle WMS Server binary request.

Description

Parse WMS requests and get responses from Server Object. 

Remarks

Responses can either be normal XML document containing meta information, feature information and exception information, or images

Specified by:
getData in interface IWMSServer
Parameters:
capabilities - The capabilities (in)
request - The request (in)
pMimeType - The pMimeType (out: use single element array)
Returns:
An unsigned byte
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setParameters

public void setParameters(java.lang.String name,
                          java.lang.String value)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IWMSServer
Handle setting WMS Server parameters.

Specified by:
setParameters in interface IWMSServer
Parameters:
name - The name (in)
value - The value (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.