Compoze Software, Inc.

com.compoze.exchange
Class Session

java.lang.Object
  extended bycom.compoze.exchange.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 Microsoft Exchange Service. The session can connect to the service using any implemented protocol. The default implementation (com.compoze.exchange.soap.AxisServerProtocol) uses the Axis SOAP library.

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_EXCHANGE_MAILBOX
           
static java.lang.String PROP_EXCHANGE_SERVER
           
static java.lang.String PROP_PROTOCOL_CLASS
           
static java.lang.String PROP_PROXY_HOST
           
static java.lang.String PROP_PROXY_IS_SSL
           
static java.lang.String PROP_PROXY_PASSWORD
           
static java.lang.String PROP_PROXY_PORT
           
static java.lang.String PROP_PROXY_USERNAME
           
static java.lang.String PROP_SOAP_ENCRYPTION_KEY
           
static java.lang.String PROP_SOAP_PASSWORD
           
static java.lang.String PROP_SOAP_SERVER
           
static java.lang.String PROP_SOAP_USERNAME
           
static java.lang.String PROP_USER_DOMAIN
           
static java.lang.String PROP_USER_PASSWORD
           
static java.lang.String PROP_USER_USERNAME
           
 
Constructor Summary
Session(java.util.Properties connectionProps)
          Constructor.
 
Method Summary
 void close()
          Closes the session to the Exchange 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.
 AddressEntries getAddressEntries()
          Gets an instance of a class used to manipulate address entries for the session.
 java.lang.String getExchangeServer()
          Gets the Exchange server for the session.
 Folders getFolders()
          Gets an instance of a class used to manipulate folders for the session.
 java.lang.String getHomeServer()
          Gets the home server.
 java.lang.String getID()
          Gets a string that uniquely identifies the session.
 java.lang.String getMailbox()
          Gets the Exchange mailbox for the session.
 Messages getMessages()
          Gets an instance of a class used to manipulate messages for the session.
 SessionInfo getSessionInfo()
          Gets an instance of a class used to get and set session parameters.
 java.lang.String getUserDomain()
          Gets the user domain for the session.
 java.lang.String getUserUsername()
          Gets the user username for the 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_EXCHANGE_SERVER

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

PROP_EXCHANGE_MAILBOX

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

PROP_USER_DOMAIN

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

PROP_USER_USERNAME

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

PROP_USER_PASSWORD

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

PROP_PROTOCOL_CLASS

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

PROP_SOAP_SERVER

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

PROP_SOAP_ENCRYPTION_KEY

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

PROP_SOAP_USERNAME

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

PROP_SOAP_PASSWORD

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

PROP_PROXY_PORT

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

PROP_PROXY_HOST

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

PROP_PROXY_USERNAME

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

PROP_PROXY_PASSWORD

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

PROP_PROXY_IS_SSL

public static final java.lang.String PROP_PROXY_IS_SSL
See Also:
Constant Field Values
Constructor Detail

Session

public Session(java.util.Properties connectionProps)
        throws ExchangeException
Constructor. Properties are required unless otherwise noted. General properties (declared in the PROP_ constants):

SOAP specific properties:

Method Detail

getHomeServer

public java.lang.String getHomeServer()
Gets the home server. This ends up being either the server that was looked up when using follow home server, or the server that was initially specified.

Returns:
the home server

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

getID

public java.lang.String getID()
Gets a string that uniquely identifies the session.

Returns:
the ID

getMailbox

public java.lang.String getMailbox()
Gets the Exchange mailbox for the session.

Returns:
the mailbox
See Also:
PROP_EXCHANGE_MAILBOX

getExchangeServer

public java.lang.String getExchangeServer()
Gets the Exchange server for the session.

Returns:
the server
See Also:
PROP_EXCHANGE_SERVER

getUserDomain

public java.lang.String getUserDomain()
Gets the user domain for the session.

Returns:
the user domain
See Also:
PROP_USER_DOMAIN

getUserUsername

public java.lang.String getUserUsername()
Gets the user username for the session.

Returns:
the user username
See Also:
PROP_USER_USERNAME

getFolders

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

Returns:
the class used to manipulate folders

getMessages

public Messages getMessages()
Gets an instance of a class used to manipulate messages for the session.

Returns:
the class used to manipulate messages

getAddressEntries

public AddressEntries getAddressEntries()
Gets an instance of a class used to manipulate address entries for the session.

Returns:
the class used to manipulate address entries

getSessionInfo

public SessionInfo getSessionInfo()
Gets an instance of a class used to get and set session parameters.

Returns:
the class instance used to manipulate session parameters

close

public void close()
           throws ExchangeException
Closes the session to the Exchange server.

Throws:
ExchangeException

Compoze Software, Inc.

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