org.openptk.connection
Interface SetupIF

All Known Implementing Classes:
Setup

public interface SetupIF

Author:
Scott Fehrman, Sun Microsystems, Inc.

Field Summary
static java.lang.String CLASSNAME_CONNECTION
           
static java.lang.String CLASSNAME_CONVERTER
           
static java.lang.String CONNECTION_MODE_SESSIONID
           
static java.lang.String CONNECTION_MODE_TOKEN
           
static java.lang.String CONNECTION_MODE_USERPASS
           
static java.lang.String NAMESPACE
           
static java.lang.String PKG_CONNECTION
           
static java.lang.String PKG_CONVERTER
           
static java.lang.String PROP_CONNECTION_CLIENTID
           
static java.lang.String PROP_CONNECTION_MODE
           
static java.lang.String PROP_CONNECTION_PASSWORD
           
static java.lang.String PROP_CONNECTION_SESSIONID
           
static java.lang.String PROP_CONNECTION_SHAREDSECRET
           
static java.lang.String PROP_CONNECTION_TOKEN
           
static java.lang.String PROP_CONNECTION_URI
           
static java.lang.String PROP_CONNECTION_USER
           
static java.lang.String PROP_DEBUG
           
static java.lang.String PROP_LOGFILE
           
static java.lang.String SESSION_ID
           
static java.lang.String URI_LOGIN
           
static java.lang.String URI_LOGOUT
           
static java.lang.String URI_RESOURCES
           
 
Method Summary
 ConnectionIF getConnection()
           Get a connection to the Server anonymously.
 ConnectionIF getConnection(java.lang.String user)
           Get a connection to the Server, using end-user id.
 ConnectionIF getConnection(java.lang.String user, java.lang.String password)
           Get a connection to the Server, using end-user name and password.
 boolean isDebug()
          Get the debug flag.
 ConnectionIF useConnection(java.lang.String sessionId)
           
 

Field Detail

CLASSNAME_CONNECTION

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

CLASSNAME_CONVERTER

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

CONNECTION_MODE_SESSIONID

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

CONNECTION_MODE_TOKEN

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

CONNECTION_MODE_USERPASS

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

NAMESPACE

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

PKG_CONNECTION

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

PKG_CONVERTER

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

PROP_CONNECTION_CLIENTID

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

PROP_CONNECTION_MODE

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

PROP_CONNECTION_PASSWORD

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

PROP_CONNECTION_SESSIONID

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

PROP_CONNECTION_SHAREDSECRET

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

PROP_CONNECTION_TOKEN

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

PROP_CONNECTION_URI

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

PROP_CONNECTION_USER

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

PROP_DEBUG

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

PROP_LOGFILE

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

SESSION_ID

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

URI_LOGIN

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

URI_LOGOUT

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

URI_RESOURCES

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

getConnection

ConnectionIF getConnection()
                           throws ConnectionException,
                                  AuthenticationException

Get a connection to the Server anonymously.

ConnectionIF conn = setup.getConnection();

Returns:
ConnectionIF a connection
Throws:
java.lang.Exception
ConnectionException
AuthenticationException

getConnection

ConnectionIF getConnection(java.lang.String user)
                           throws ConnectionException,
                                  AuthenticationException

Get a connection to the Server, using end-user id.

ConnectionIF conn = setup.getConnection("jdoe");

Parameters:
user - String end-user id
Returns:
ConnectionIF a connection
Throws:
java.lang.Exception
ConnectionException
AuthenticationException

getConnection

ConnectionIF getConnection(java.lang.String user,
                           java.lang.String password)
                           throws ConnectionException,
                                  AuthenticationException

Get a connection to the Server, using end-user name and password.

ConnectionIF conn = setup.getConnection("jdoe","password");

Parameters:
user - String end-user name
password - String end-user password
Returns:
ConnectionIF a connection
Throws:
java.lang.Exception
ConnectionException
AuthenticationException

isDebug

boolean isDebug()
Get the debug flag.

Returns:
boolean display debug data

useConnection

ConnectionIF useConnection(java.lang.String sessionId)
                           throws ConnectionException,
                                  AuthenticationException
Parameters:
sessionId - String a current and valid session id
Returns:
ConnectionIF a connection
Throws:
ConnectionException
AuthenticationException


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