org.springframework.extensions.webscripts.connector
Class ConnectorSession

java.lang.Object
  extended by org.springframework.extensions.webscripts.connector.ConnectorSession
All Implemented Interfaces:
Serializable

public class ConnectorSession
extends Object
implements Serializable

Container for Connector "session state". Session state consists of headers, cookies and parameters that need to be bound onto the connector with subsequent connections. This class essentially allows for the mimic of Browser-like functionality in terms of subsequent Connectors reusing state from previous Connector responses.

Author:
muzquiano
See Also:
Serialized Form

Constructor Summary
ConnectorSession(String endpointId)
          Instantiates a new connector session.
 
Method Summary
 String getCookie(String name)
          Gets a header.
 String[] getCookieNames()
          Returns the cookie names.
 String getEndpointId()
          Gets the endpoint id.
 String getParameter(String key)
          Gets a parameter.
 String[] getParameterKeys()
          Returns the parameter keys.
 void setCookie(String name, String value)
          Sets a given header.
 void setParameter(String key, String value)
          Sets a given parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectorSession

public ConnectorSession(String endpointId)
Instantiates a new connector session.

Parameters:
endpointId - the endpoint id
Method Detail

getEndpointId

public String getEndpointId()
Gets the endpoint id.

Returns:
the endpoint id

getParameter

public String getParameter(String key)
Gets a parameter.

Parameters:
key - the key
Returns:
the parameter

setParameter

public void setParameter(String key,
                         String value)
Sets a given parameter.

Parameters:
key - the key
value - the value

getParameterKeys

public String[] getParameterKeys()
Returns the parameter keys.

Returns:
array of parameter keys

getCookie

public String getCookie(String name)
Gets a header.

Parameters:
name - the name
Returns:
the header

setCookie

public void setCookie(String name,
                      String value)
Sets a given header.

Parameters:
name - the name
value - the header

getCookieNames

public String[] getCookieNames()
Returns the cookie names.

Returns:
array of cookie names


Copyright © 2009 SpringSource, Inc. All Rights Reserved.