|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.wms.client.ServerConnection
public class ServerConnection
ServerConnection is an entry point of the client API. You need to instantiate ServerConnection to get WMS server capabilities information.
ServerConnection server = new ServerConnection("http://host:8399/arcgis/services/usa_n/MapServer/WMSServer", ServerConnection.SPEC_VER_1_1_1);For an unknow server, the ServerConnect will look up for the highest version server supporting.
ServerConnection server = new ServerConnection("http://host:8399/arcgis/services/usa_n/MapServer/WMSServer"); System.out.println(server.getServerVersion());
Field Summary | |
---|---|
static SpatialReference |
DEFAULT_REF
The default spatial reference if not specified in the server. |
protected SpatialReference |
defaultMapRef
The default spatial reference of the maps associated with this server. |
static String |
ENCODER_CHAR
The name of the default character encoding of the URLEncoder. |
static String |
SPEC_VER_1_0_0
WMS version 1.0.0 |
static String |
SPEC_VER_1_1_0
WMS version 1.1.0 |
static String |
SPEC_VER_1_1_1
WMS version 1.1.1 |
static String |
SPEC_VER_1_3_0
WMS version 1.3.0 |
static String[] |
supportedVersion
All supported versions. |
Constructor Summary | |
---|---|
ServerConnection()
Instantiates an empty ServerConnection. |
|
ServerConnection(String serverURL)
Instantiates an object of ServerConnection. |
|
ServerConnection(String serverURL,
String version)
Instantiates an object of ServerConnection with the given version. |
|
ServerConnection(String serverURL,
String version,
RequestHandler handler)
Instantiates an object of ServerConnection with a given RequestHandler. |
Method Summary | |
---|---|
void |
connect(String serverURL,
String version)
Connects this server to the given URL. |
List<String> |
getCapabilitiesFormats()
Gets the response formats of the GetCapabilities operation supported by the server. |
String |
getCapabilitiesServiceURL()
Gets the URL of the GetCapabilities service. |
String |
getExceptionFormat()
Gets the format of exceptions for the communication. |
List<String> |
getExceptionFormats()
Gets the all formats of exceptions supported by the server. |
List<String> |
getFeatureInfoFormats()
Gets the response formats of the GetFeatureInfo operation supported by the server. |
String |
getFeatureInfoServiceURL()
Gets the URL of the GetFeatureInfo service. |
String |
getHttpReferrer()
Returns the HTTP Referrer URL. |
static Level |
getLoggerLevel()
Gets the logger level of the API. |
List<String> |
getMapFormats()
Gets the response formats of the GetMap operation supported by the server. |
String |
getMapServiceURL()
Gets the URL of the GetMap service. |
String |
getPassword()
Returns the password used for the connection. |
RequestHandler |
getRequestHandler()
Gets the request handler associated with the ServerConnection. |
String |
getServerAbstract()
Gets the abstract of the server. |
String |
getServerName()
Gets the server name. |
String |
getServerTitle()
Gets the title of the server. |
String |
getServerURL()
Gets the URL of the WMS Server. |
String |
getServerVersion()
Gets the highest version the server supported. |
String |
getUserName()
Returns the userName used for the connection. |
String |
getVersion()
Gets the version of the server. |
void |
setExceptionFormat(String exceptionFormat)
Sets the format of exception for the communication. |
void |
setHttpReferrer(String httpReferrer)
Sets the HTTP Referrer URL used while connecting WMS Service. |
static void |
setLoggerLevel(Level newLevel)
Sets the logger level of the API. |
void |
setPassword(String password)
Sets password while connecting WMS Service. |
void |
setRequestHandler(RequestHandler requestHandler)
Overrides the default RequestHandler with the given one. |
protected void |
setServerVersion(String serverVersion)
Sets the version to which the instance connect. |
void |
setUserName(String userName)
Sets username while connecting WMS Service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SPEC_VER_1_0_0
public static final String SPEC_VER_1_1_0
public static final String SPEC_VER_1_1_1
public static final String SPEC_VER_1_3_0
public static String[] supportedVersion
public static String ENCODER_CHAR
public static SpatialReference DEFAULT_REF
protected SpatialReference defaultMapRef
Constructor Detail |
---|
public ServerConnection()
public ServerConnection(String serverURL) throws ServiceException, IOException
serverURL
- the server URL, e.g. "http://host:port/wmsserver".
ServiceException
IOException
public ServerConnection(String serverURL, String version) throws ServiceException, IOException
serverURL
- the server URL, e.g. "http://host:port/wmsserver/".version
- the version string, e.g. ServerConnection.SPEC_VER_1_3_0.
ServiceException
IOException
public ServerConnection(String serverURL, String version, RequestHandler handler) throws ServiceException, IOException
RequestHandler handler = RequestHandler.getDefaultInstance(); RequestListener l = new RequestListener() { public String createRequest(Service service, String request) { .... return request; } }; handler.setRequestListener(l); ServerConnection server = new ServerConnection("http://host/service",null,handler);
serverURL
- the server URL, e.g. "http://host:port/wmsserver/".version
- the version string, e.g. ServerConnection.SPEC_VER_1_3_0.handler
- the handler to override the default one.
ServiceException
IOException
Method Detail |
---|
public void connect(String serverURL, String version) throws IOException
serverURL
- the server URL, e.g. "http://host:port/wmsserver/".version
- the version string, e.g. ServerConnection.SPEC_VER_1_3_0.
IOException
public String getServerURL()
public String getVersion()
public RequestHandler getRequestHandler()
public void setRequestHandler(RequestHandler requestHandler)
public List<String> getCapabilitiesFormats()
public List<String> getFeatureInfoFormats()
public List<String> getMapFormats()
public String getServerAbstract()
public String getServerName()
public String getServerTitle()
public String getServerVersion()
public String getExceptionFormat()
public void setExceptionFormat(String exceptionFormat)
public List<String> getExceptionFormats()
public String getFeatureInfoServiceURL()
public String getMapServiceURL()
public String getCapabilitiesServiceURL()
protected void setServerVersion(String serverVersion)
public void setHttpReferrer(String httpReferrer)
httpReferrer
- the HTTP Referrer URLpublic String getHttpReferrer()
public static Level getLoggerLevel()
public static void setLoggerLevel(Level newLevel)
public String getUserName()
public void setUserName(String userName)
userName
- userName for connecting to the resource.public String getPassword()
public void setPassword(String password)
password
- password for connecting to the resource.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |