Compoze Software, Inc.

com.compoze.domino
Class Session


java.lang.Object

  |

  +--com.compoze.domino.Session

All Implemented Interfaces:
java.io.Serializable

public class Session
extends java.lang.Object
implements java.io.Serializable

This class represents a session to the Compoze Domino Service. The session can connect to the service using any implemented protocol.

Methods names that begin with the string server (as well as the close method) require a query to the server to be completed. Because each query involves some overhead, keeping the number of queries to a minimum and doing as much as possible in one query will improve the performance of the application.

See Also:
Serialized Form

Field Summary
static java.lang.String PROP_DOMINO_LOOKUP_SERVER
          The name of a machine in the Notes domain that will be used to lookup the specified user's mailbox information, such as database and server name to connect to (optional, leave blank to use the same machine as the Domino Service).
static java.lang.String PROP_DOMINO_MAILBOX
          The name of a mailbox to connect to (optional).
static java.lang.String PROP_DOMINO_VERSION_CHECK
          The flag to check for version conflict between the connector and the service.
static java.lang.String PROP_PROXY_PASSWORD
          The password used to log into the proxy server (optional).
static java.lang.String PROP_PROXY_URL
          The hostname of the proxy server as it can be resolved from the machine you are running this exerciser on.
static java.lang.String PROP_PROXY_USERNAME
          The username used to log into the proxy server (optional).
static java.lang.String PROP_SERVICE_URL
          The hostname of the Compoze Domino Service machine as it can be resolved from the machine you are running this exerciser on (required).
static java.lang.String PROP_USER_PASSWORD
          The Internet password of the user that will access the Domino mailbox (required).
static java.lang.String PROP_USER_USERNAME
          The username of the user that will access the Domino mailbox (required).
 
Constructor Summary
Session(java.util.Properties connectionProps)
          Constructor.
 
Method Summary
 void close()
          Closes the session to the Domino server.
 java.lang.String endTrace()
          Ends tracing calls to the server and returns a string showing all calls that were made since tracing was started.
 AddressBooks getAddressBooks()
          Gets an instance of a class used to manipulate address books for the session.
 long getAttachmentSizeLimit()
          Gets the attachment size limit (in bytes).
 double getAttachmentSizeLimitInKilos()
          Gets the attachment size limit (in kilosbytes).
 Documents getDocuments()
          Gets an instance of a class used to manipulate documents for the session.
 Folders getFolders()
          Gets an instance of a class used to manipulate folders for the session.
 java.lang.String getID()
          Gets a unique ID for the session (only unique to the server the session is connected to).
 java.lang.String getMailbox()
          Gets the mailbox for the session.
 java.lang.String getServiceURL()
          Gets the Compoze Domino Service URL for the session.
 java.util.TimeZone getTimeZone()
          Gets the time zone for this session.
 UserInfo getUserInfo()
          Gets the user info for the session.
 void serverCheck()
          Hits the server and checks if the session has expired.
 void setTimeZone(java.util.TimeZone timeZone)
          Sets the time zone for this session.
 void startTrace()
          Starts tracing calls to the server (verbose).
 void startTrace(boolean bVerbose)
          Starts tracing calls to the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_SERVICE_URL


public static final java.lang.String PROP_SERVICE_URL
The hostname of the Compoze Domino Service machine as it can be resolved from the machine you are running this exerciser on (required). The hostname can be either a machine name or IP address. This is also referred to as the Domino/Notes Service Host Name.

PROP_USER_USERNAME


public static final java.lang.String PROP_USER_USERNAME
The username of the user that will access the Domino mailbox (required).

PROP_USER_PASSWORD


public static final java.lang.String PROP_USER_PASSWORD
The Internet password of the user that will access the Domino mailbox (required).

PROP_DOMINO_MAILBOX


public static final java.lang.String PROP_DOMINO_MAILBOX
The name of a mailbox to connect to (optional).

PROP_PROXY_URL


public static final java.lang.String PROP_PROXY_URL
The hostname of the proxy server as it can be resolved from the machine you are running this exerciser on. The hostname can be either a machine name or an IP address.

PROP_PROXY_USERNAME


public static final java.lang.String PROP_PROXY_USERNAME
The username used to log into the proxy server (optional).

PROP_PROXY_PASSWORD


public static final java.lang.String PROP_PROXY_PASSWORD
The password used to log into the proxy server (optional).

PROP_DOMINO_VERSION_CHECK


public static final java.lang.String PROP_DOMINO_VERSION_CHECK
The flag to check for version conflict between the connector and the service.

PROP_DOMINO_LOOKUP_SERVER


public static final java.lang.String PROP_DOMINO_LOOKUP_SERVER
The name of a machine in the Notes domain that will be used to lookup the specified user's mailbox information, such as database and server name to connect to (optional, leave blank to use the same machine as the Domino Service). This is also referred to as the Domino Catalog Host Name.
Constructor Detail

Session


public Session(java.util.Properties connectionProps)
        throws DominoException
Constructor.

Note: DominoACLException is thrown if the specified user and password credentials do not have adequate permission to access the specified mailbox.

Note: UserPasswordException is thrown if the user and/or password is incorrect.

Note: NoMailboxException is thrown if the user's mailbox does not exist. This could be due to the user not having a Notes mailbox.

Parameters:
connectionProps - the connection properties to authenticate against Domino (see PROP_ constants)
Throws:
DominoException - occurs if an exception occurs while connecting to Domino
Method Detail

getFolders


public Folders getFolders()
Gets an instance of a class used to manipulate folders for the session.
Returns:
the class used to manipulate folders

getDocuments


public Documents getDocuments()
Gets an instance of a class used to manipulate documents for the session.
Returns:
the class used to manipulate documents

getTimeZone


public java.util.TimeZone getTimeZone()
Gets the time zone for this session.
Returns:
the time zone

setTimeZone


public void setTimeZone(java.util.TimeZone timeZone)
Sets the time zone for this session.
Parameters:
timeZone - the time zone (may not be null)

getAddressBooks


public AddressBooks getAddressBooks()
Gets an instance of a class used to manipulate address books for the session.
Returns:
the class used to manipulate address books

getID


public java.lang.String getID()
                       throws DominoException
Gets a unique ID for the session (only unique to the server the session is connected to).
Returns:
the ID

getAttachmentSizeLimit


public long getAttachmentSizeLimit()
Gets the attachment size limit (in bytes).
Returns:
the attachment size limit (in bytes) or 0 for no limit

getAttachmentSizeLimitInKilos


public double getAttachmentSizeLimitInKilos()
Gets the attachment size limit (in kilosbytes).
Returns:
the attachment size limit (in kilosbytes) or 0 for no limit

getMailbox


public java.lang.String getMailbox()
Gets the mailbox for the session.
Returns:
the mailbox
See Also:
PROP_DOMINO_MAILBOX

getUserInfo


public UserInfo getUserInfo()
Gets the user info for the session.
Returns:
the user info

getServiceURL


public java.lang.String getServiceURL()
Gets the Compoze Domino Service URL for the session.
Returns:
the service URL
See Also:
PROP_SERVICE_URL

close


public void close()
           throws DominoException
Closes the session to the Domino server.

serverCheck


public void serverCheck()
                 throws DominoException
Hits the server and checks if the session has expired.
Throws:
DominoException - occurs if the session has expired

startTrace


public void startTrace()
Starts tracing calls to the server (verbose).

startTrace


public void startTrace(boolean bVerbose)
Starts tracing calls to the server.
Parameters:
bVerbose - if true, trace data sent and received, otherwise just trace elapsed time and number of requests

endTrace


public java.lang.String endTrace()
Ends tracing calls to the server and returns a string showing all calls that were made since tracing was started.
Returns:
a string showing information about all queries that were made since startTrace() was called

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.