org.openptk.connection
Interface ConnectionIF

All Superinterfaces:
ElementIF
All Known Implementing Classes:
Connection, JerseyConnection

public interface ConnectionIF
extends ElementIF

Author:
Scott Fehrman, Sun Microsystems, Inc.

Nested Class Summary
static class ConnectionIF.Session
           
 
Field Summary
static java.lang.String PARAM_CLIENTCRED
           
static java.lang.String PARAM_CLIENTID
           
static java.lang.String PARAM_PASSWORD
           
static java.lang.String PARAM_TOKEN
           
static java.lang.String PARAM_USER
           
static java.lang.String PROP_COOKIE_NAME
           
static java.lang.String PROP_URI_CLIENTS
           
static java.lang.String PROP_URI_CONTEXTS
           
static java.lang.String PROP_URI_LOGIN
           
static java.lang.String PROP_URI_LOGOUT
           
static java.lang.String RESOURCE_SESSION
           
 
Method Summary
 void close()
          Close the connection to the Server.
 Output execute(Opcode opcode, Input input)
          Execute the operation (Opcode) on the Server.
 java.lang.String getContextId()
          Get the "current" Context Id.
 java.lang.String[] getContextIds()
          Get all of the available Context Ids.
 java.lang.String getSessionData(ConnectionIF.Session session)
          Get the String representing a Session data item.
 boolean hasSessionChanged()
          Has the Session changed from the initial connection.
 boolean isDebug()
          Get the debug flag.
 void setContextId(java.lang.String contextId)
          Set the "current" Context Id.
 void setDebug(boolean debug)
          Set the debug flag.
 
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
 

Field Detail

PARAM_CLIENTCRED

static final java.lang.String PARAM_CLIENTCRED
See Also:
Constant Field Values

PARAM_CLIENTID

static final java.lang.String PARAM_CLIENTID
See Also:
Constant Field Values

PARAM_PASSWORD

static final java.lang.String PARAM_PASSWORD
See Also:
Constant Field Values

PARAM_TOKEN

static final java.lang.String PARAM_TOKEN
See Also:
Constant Field Values

PARAM_USER

static final java.lang.String PARAM_USER
See Also:
Constant Field Values

PROP_COOKIE_NAME

static final java.lang.String PROP_COOKIE_NAME
See Also:
Constant Field Values

PROP_URI_CLIENTS

static final java.lang.String PROP_URI_CLIENTS
See Also:
Constant Field Values

PROP_URI_CONTEXTS

static final java.lang.String PROP_URI_CONTEXTS
See Also:
Constant Field Values

PROP_URI_LOGIN

static final java.lang.String PROP_URI_LOGIN
See Also:
Constant Field Values

PROP_URI_LOGOUT

static final java.lang.String PROP_URI_LOGOUT
See Also:
Constant Field Values

RESOURCE_SESSION

static final java.lang.String RESOURCE_SESSION
See Also:
Constant Field Values
Method Detail

close

void close()
           throws ConnectionException
Close the connection to the Server.

Throws:
java.lang.Exception
ConnectionException

execute

Output execute(Opcode opcode,
               Input input)
               throws ConnectionException
Execute the operation (Opcode) on the Server.

Parameters:
opcode - Opcode what operation to execute
input - Input data used by the operation
Returns:
Output results of the operation
Throws:
java.lang.Exception
ConnectionException

getContextId

java.lang.String getContextId()
Get the "current" Context Id.

Returns:
String Id of the current Context

getContextIds

java.lang.String[] getContextIds()
Get all of the available Context Ids.

Returns:
String[] Array of available Context Ids

getSessionData

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

Returns:
String Session data
Throws:
ConnectionException

hasSessionChanged

boolean hasSessionChanged()
Has the Session changed from the initial connection.

Returns:
boolean True if the session has changed

isDebug

boolean isDebug()
Get the debug flag.

Returns:
boolean will the debug data be displayed.

setContextId

void setContextId(java.lang.String contextId)
                  throws ConnectionException
Set the "current" Context Id.

Parameters:
contextId - a valid Context Id
Throws:
java.lang.Exception
ConnectionException

setDebug

void setDebug(boolean debug)
Set the debug flag.

Parameters:
debug - should debug data be displayed.


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