Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.compoze.exchange
Class Session

    java.lang.Object
      com.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):
  - `PROP_EXCHANGE_SERVER` - the Exchange server hostname or IP (optional, if omitted, the server is looked up using the GAL, which must first be configured properly in the service)
  - `PROP_EXCHANGE_MAILBOX` the Exchange server login mailbox, or alias (if omitted, the primary account is used to look up the mailbox in the GAL, which must first be configured properly in the service)
  - `PROP_USER_DOMAIN` - the domain of a user that can access the Exchange account
  - `PROP_USER_USERNAME` - the username of a user that can access the Exchange account
  - `PROP_USER_PASSWORD` - the password of a user that can access the Exchange account
  - `PROP_PROTOCOL_CLASS` (optional property) - the class that implements the server connectivity (default is `com.compoze.exchange.soap.AxisServerProtocol`)

  SOAP specific properties:

  - `PROP_SOAP_SERVER` (optional property) - the name of a server, URI, or a full URL to the Compoze Exchange service WSDL file (for example `server`, `http://server/`, `http://server:port/` or `http://server:port/czexsoap/CzExSoap.WSDL`). https URLs may be used if JSSE is installed in the running virtual machine. If this parameter is missing, "localhost" is assumed.
  - `PROP_SOAP_ENCRYPTION_KEY` (optional property) - a common secret shared with the SOAP service used to encrypt user passwords (a default is used if it is not available)
  - `PROP_SOAP_USERNAME` - (optional property) the username to pass via HTTP basic authentication (if passed, PROP_SOAP_PASSWORD must be passed)
  - `PROP_SOAP_PASSWORD` - (optional property) the password to pass via HTTP basic authentication (if passed, PROP_SOAP_USERNAME must be passed)
  - `PROP_PROXY_PORT` (optional) - the proxy port
  - `PROP_PROXY_HOST` (optional) - the proxy host
  - `PROP_PROXY_USERNAME` (optional) - the proxy username
  - `PROP_PROXY_PASSWORD` (optional) - the proxy password
  - `PROP_PROXY_IS_SSL` (optional) - set to "true" if the proxy is SSL enabled

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`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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