Esri Geoportal Server
1.2.9

com.esri.gpt.agp.client
Class AgpConnection

java.lang.Object
  extended by com.esri.gpt.agp.client.AgpConnection

public class AgpConnection
extends Object

An ArcGIS Portal connection.


Constructor Summary
AgpConnection()
          Default constructor.
 
Method Summary
 void appendToken(StringBuilder params)
          Appends the token parameter to a URL buffer.
 void close()
          Closes any open resources.
 AgpClient ensureClient()
          Ensures the existence of a client.
 void generateToken()
          Generates a security token.
 AgpClient getClient()
          Gets the client.
 AgpContext getContext()
          Gets the context.
 String getHost()
          Gets the host.
 int getPort()
          Gets the port.
 AgpToken getToken()
          Gets the token.
 AgpTokenCriteria getTokenCriteria()
          Gets the criteria to use when generating a security token.
 String getWebContext()
          Gets a web context.
 String makeBaseUrl(String protocol)
          Makes the base url.
 String makeGenerateTokenUrl()
          Makes the generate token url.
 AgpProperties makeRequestHeaderProperties()
          Makes properties for the request header.
 String makeSharingUrl()
          Makes the sharing url.
protected  AgpClient newAgpClient()
          Create new instance of AgpClient
 void setClient(AgpClient client)
          Sets the client.
 void setContext(AgpContext context)
          Sets the context.
 void setHost(String host)
          Sets the host.
 void setPort(int port)
          Sets the port.
 void setToken(AgpToken token)
          Sets the token.
 void setTokenCriteria(AgpTokenCriteria tokenCriteria)
          Sets the criteria to use when generating a security token.
 void setWebContext(String webContext)
          Sets web context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgpConnection

public AgpConnection()
Default constructor.

Method Detail

getClient

public AgpClient getClient()
Gets the client.

Returns:
the client

setClient

public void setClient(AgpClient client)
Sets the client.

Parameters:
client - the client

getContext

public AgpContext getContext()
Gets the context.

Returns:
the context

setContext

public void setContext(AgpContext context)
Sets the context.

Parameters:
context - the context

getHost

public String getHost()
Gets the host.

Returns:
the host

setHost

public void setHost(String host)
Sets the host.

Parameters:
host - the host

getWebContext

public String getWebContext()
Gets a web context.

Web context (typically: "/arcgis") provides compatibility with 10.2 version of Portal of ArcGIS.

Returns:
web context or null if no web context

setWebContext

public void setWebContext(String webContext)
Sets web context.

If web context is an empty string it will be replaced with null.
If web context is a non empty string it will be assured that it has "/" in front of it.

Parameters:
webContext - web context

getPort

public int getPort()
Gets the port.

Returns:
the port

setPort

public void setPort(int port)
Sets the port.

Parameters:
port - the port

getToken

public AgpToken getToken()
Gets the token.

Returns:
the token

setToken

public void setToken(AgpToken token)
Sets the token.

Parameters:
token - the token

getTokenCriteria

public AgpTokenCriteria getTokenCriteria()
Gets the criteria to use when generating a security token.

Returns:
the token criteria

setTokenCriteria

public void setTokenCriteria(AgpTokenCriteria tokenCriteria)
Sets the criteria to use when generating a security token.

Parameters:
tokenCriteria - the token criteria

appendToken

public void appendToken(StringBuilder params)
Appends the token parameter to a URL buffer.

Parameters:
params - the buffer

close

public void close()
Closes any open resources.


ensureClient

public AgpClient ensureClient()
Ensures the existence of a client.


generateToken

public void generateToken()
                   throws Exception
Generates a security token.

Throws:
Exception

makeBaseUrl

public String makeBaseUrl(String protocol)
Makes the base url.

Returns:
the base url

makeGenerateTokenUrl

public String makeGenerateTokenUrl()
Makes the generate token url.

Returns:
the generate token url

makeRequestHeaderProperties

public AgpProperties makeRequestHeaderProperties()
Makes properties for the request header.

Returns:
the request header properties

makeSharingUrl

public String makeSharingUrl()
Makes the sharing url.

Returns:
the sharing url

newAgpClient

protected AgpClient newAgpClient()
Create new instance of AgpClient

Returns:
new instance

Esri Geoportal Server
1.2.9

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.