org.openptk.connection.jersey
Class JerseyConnection

java.lang.Object
  extended by org.openptk.api.Element
      extended by org.openptk.connection.Connection
          extended by org.openptk.connection.jersey.JerseyConnection
All Implemented Interfaces:
ElementIF, ConnectionIF

public class JerseyConnection
extends Connection

Author:
Scott Fehrman, Sun Microsystems, Inc.

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.openptk.connection.ConnectionIF
ConnectionIF.Session
 
Field Summary
 
Fields inherited from class org.openptk.connection.Connection
_converter, _uriClients, _uriContexts, _uriLogin, _uriLogout, _uriSessionInfo, _uriSubjects
 
Fields inherited from interface org.openptk.connection.ConnectionIF
PARAM_CLIENTCRED, PARAM_CLIENTID, PARAM_PASSWORD, PARAM_TOKEN, PARAM_USER, PROP_COOKIE_NAME, PROP_URI_CLIENTS, PROP_URI_CONTEXTS, PROP_URI_LOGIN, PROP_URI_LOGOUT, RESOURCE_SESSION
 
Constructor Summary
JerseyConnection(java.util.Properties props)
          Create a new ConnectionIF instance using the Jersey Client API.
 
Method Summary
 void close()
          Close the open connection.
protected  Output doCreate(Input input)
          Execute CREATE operation.
protected  Output doDelete(Input input)
          Execute DELETE operation.
protected  Output doPwdChange(Input input)
          Execute PWDCHANGE operation.
protected  Output doPwdForgot(Input input)
          Execute PWDFORGOT operation.
protected  Output doPwdReset(Input input)
          Execute PWDRESET operation.
protected  Output doRead(Input input)
          Execute READ operation.
protected  Output doSearch(Input input)
          Execute SEARCH operation.
protected  Output doUpdate(Input input)
          Execute UPDATE operation.
 java.lang.String getSessionData(ConnectionIF.Session session)
          Get the String representing a Session data item.
 
Methods inherited from class org.openptk.connection.Connection
debug, decode, encode, encrypt, execute, getContextId, getContextIds, getSessionId, getStructureFromAttribute, getStructureFromInput, handleError, hasSessionChanged, isDebug, logError, logInfo, logWarning, processClientStructure, setContextId, setDebug, setSessionChanged, setSessionId, updateOutputFromReadStructure, updateOutputFromSearchStructure, urlDecode, urlEncode
 
Methods inherited from class org.openptk.api.Element
addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttributes, copy, getAttribute, getAttributeNames, getAttributes, getAttributesSize, getDescription, getKey, getProperties, getPropertiesSize, getProperty, getState, getStateAsString, getStatus, getUniqueId, getUniqueIdType, isError, removeAttribute, removeProperty, setAttributes, setDescription, setError, setKey, setProperties, setProperty, setState, setStatus, setUniqueId, setUniqueId, setUniqueId, setUniqueId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openptk.api.ElementIF
addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, addAttributes, copy, getAttribute, getAttributeNames, getAttributes, getAttributesSize, getDescription, getKey, getProperties, getPropertiesSize, getProperty, getState, getStateAsString, getStatus, getUniqueId, getUniqueIdType, isError, removeAttribute, removeProperty, setAttributes, setDescription, setError, setKey, setProperties, setProperty, setState, setStatus, setUniqueId, setUniqueId, setUniqueId, setUniqueId
 

Constructor Detail

JerseyConnection

public JerseyConnection(java.util.Properties props)
                 throws ConnectionException,
                        AuthenticationException
Create a new ConnectionIF instance using the Jersey Client API.

Throws:
java.lang.Exception
ConnectionException
AuthenticationException
Method Detail

close

public final void close()
                 throws ConnectionException
Close the open connection. The Session will be removed.

Specified by:
close in interface ConnectionIF
Overrides:
close in class Connection
Throws:
java.lang.Exception
ConnectionException

doCreate

protected Output doCreate(Input input)
                   throws ConnectionException,
                          StructureException
Execute CREATE operation.

Overrides:
doCreate in class Connection
Parameters:
input -
Returns:
Output
Throws:
java.lang.Exception
ConnectionException
StructureException

doDelete

protected Output doDelete(Input input)
                   throws ConnectionException,
                          StructureException
Execute DELETE operation.

Overrides:
doDelete in class Connection
Parameters:
input -
Returns:
Output
Throws:
java.lang.Exception
ConnectionException
StructureException

doPwdChange

protected Output doPwdChange(Input input)
                      throws ConnectionException,
                             StructureException
Execute PWDCHANGE operation.

Overrides:
doPwdChange in class Connection
Parameters:
input -
Returns:
Output
Throws:
java.lang.Exception
ConnectionException
StructureException

doPwdForgot

protected Output doPwdForgot(Input input)
                      throws ConnectionException,
                             StructureException
Execute PWDFORGOT operation.

Overrides:
doPwdForgot in class Connection
Parameters:
input -
Returns:
Output
Throws:
java.lang.Exception
ConnectionException
StructureException

doPwdReset

protected Output doPwdReset(Input input)
                     throws ConnectionException,
                            StructureException
Execute PWDRESET operation.

Overrides:
doPwdReset in class Connection
Parameters:
input -
Returns:
Output
Throws:
java.lang.Exception
ConnectionException
StructureException

doRead

protected Output doRead(Input input)
                 throws ConnectionException,
                        StructureException
Execute READ operation.

Overrides:
doRead in class Connection
Parameters:
input -
Returns:
Output
Throws:
java.lang.Exception
ConnectionException
StructureException

doSearch

protected Output doSearch(Input input)
                   throws ConnectionException,
                          StructureException
Execute SEARCH operation.

Overrides:
doSearch in class Connection
Parameters:
input -
Returns:
Output
Throws:
java.lang.Exception
ConnectionException
StructureException

doUpdate

protected Output doUpdate(Input input)
                   throws ConnectionException,
                          StructureException
Execute UPDATE operation.

Overrides:
doUpdate in class Connection
Parameters:
input -
Returns:
Output
Throws:
java.lang.Exception
ConnectionException
StructureException

getSessionData

public final java.lang.String getSessionData(ConnectionIF.Session session)
                                      throws ConnectionException
Get the String representing a Session data item.

Specified by:
getSessionData in interface ConnectionIF
Specified by:
getSessionData in class Connection
Returns:
String Session data
Throws:
ConnectionException


View/submit a bug or feature

For further API reference and developer documentation, see www.openptk.org. That documentation contains more detailed, developer-targeted descriptions, definitions of terms, workarounds, and working code examples.

Copyright (C) 2008-2012, Project OpenPTK. All Rights Reserved