org.eclipse.emf.cdo.session

## Interface CDOSessionConfiguration

- All Superinterfaces:
    INotifier
  All Known Subinterfaces:
    CDONet4jSessionConfiguration, CDOSessionConfiguration, FailoverCDOSessionConfiguration, InternalCDOSessionConfiguration, ReconnectingCDOSessionConfiguration, RecoveringCDOSessionConfiguration

      public interface CDOSessionConfiguration
      extends INotifier

  Configures and opens new `sessions`.

  A session configuration can fire the following events:

  - `CDOSessionConfiguration.SessionOpenedEvent` after a session has been opened by this configuration.
  Since:
    2.0
  Author:
    Eike Stepper
  No Implement
    This interface is not intended to be implemented by clients.
  No Extend
    This interface is not intended to be extended by clients.
  Apiviz
  Apiviz
    `CDOSession` - - opens, `CDOSessionConfiguration.SessionOpenedEvent` - - fires

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `CDOSessionConfiguration.SessionOpenedEvent` Fired from a `session configuration` after a new `session` has been opened.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `CDOAuthenticator` | `getAuthenticator()` Deprecated. As of 4.2 use `getCredentialsProvider()` and `setCredentialsProvider(IPasswordCredentialsProvider)`, respectively
    `CDOBranchManager` | `getBranchManager()`
    `IPasswordCredentialsProvider` | `getCredentialsProvider()`
    `CDOSession.ExceptionHandler` | `getExceptionHandler()`
    `CDOFetchRuleManager` | `getFetchRuleManager()`
    `CDOIDGenerator` | `getIDGenerator()`
    `CDOCommonSession.Options.LockNotificationMode` | `getLockNotificationMode()`
    `CDOCommonSession.Options.PassiveUpdateMode` | `getPassiveUpdateMode()`
    `java.lang.String` | `getUserID()`
    `boolean` | `isActivateOnOpen()` Returns `true` if the session opened by `openSession()` will be automatically activated, `false` otherwise.
    `boolean` | `isPassiveUpdateEnabled()`
    `boolean` | `isSessionOpen()` Returns `true` if the session for this configuration is currently open, `false` otherwise.
    `CDOSession` | `openSession()` Opens the session for this configuration.
    `void` | `setActivateOnOpen(boolean activateOnOpen)` Specifies whether the session opened by `openSession()` will be automatically activated or not.
    `void` | `setBranchManager(CDOBranchManager branchManager)`
    `void` | `setCredentialsProvider(IPasswordCredentialsProvider credentialsProvider)`
    `void` | `setExceptionHandler(CDOSession.ExceptionHandler exceptionHandler)` A special exception handler can be set before the session is opened and can not be changed thereafter.
    `void` | `setFetchRuleManager(CDOFetchRuleManager fetchRuleManager)` A special ID generator can be set before the session is opened and can not be changed thereafter.
    `void` | `setIDGenerator(CDOIDGenerator idGenerator)` A special ID generator can be set before the session is opened and can not be changed thereafter.
    `void` | `setLockNotificationMode(CDOCommonSession.Options.LockNotificationMode mode)`
    `void` | `setPassiveUpdateEnabled(boolean passiveUpdateEnabled)`
    `void` | `setPassiveUpdateMode(CDOCommonSession.Options.PassiveUpdateMode passiveUpdateMode)`
    `void` | `setUserID(java.lang.String userID)`

    - ### Methods inherited from interface org.eclipse.net4j.util.event.INotifier

      `addListener, getListeners, hasListeners, removeListener`

- - ### Method Detail

    - #### getUserID

          java.lang.String getUserID()

      Since:
        4.2

    - #### setUserID

          void setUserID(java.lang.String userID)

      Since:
        4.2

    - #### isPassiveUpdateEnabled

          boolean isPassiveUpdateEnabled()

      Since:
        3.0
      See Also:
        `CDOCommonSession.Options.isPassiveUpdateEnabled()`

    - #### setPassiveUpdateEnabled

          void setPassiveUpdateEnabled(boolean passiveUpdateEnabled)

      Since:
        3.0
      See Also:
        `CDOCommonSession.Options.setPassiveUpdateEnabled(boolean)`

    - #### getPassiveUpdateMode

          CDOCommonSession.Options.PassiveUpdateMode getPassiveUpdateMode()

      Since:
        3.0
      See Also:
        `CDOCommonSession.Options.getPassiveUpdateMode()`

    - #### setPassiveUpdateMode

          void setPassiveUpdateMode(CDOCommonSession.Options.PassiveUpdateMode passiveUpdateMode)

      Since:
        3.0
      See Also:
        `CDOCommonSession.Options.setPassiveUpdateMode(PassiveUpdateMode)`

    - #### getLockNotificationMode

          CDOCommonSession.Options.LockNotificationMode getLockNotificationMode()

      Since:
        4.1

    - #### setLockNotificationMode

          void setLockNotificationMode(CDOCommonSession.Options.LockNotificationMode mode)

      Since:
        4.1

    - #### getExceptionHandler

          CDOSession.ExceptionHandler getExceptionHandler()

      See Also:
        `CDOSession.getExceptionHandler()`

    - #### setExceptionHandler

          void setExceptionHandler(CDOSession.ExceptionHandler exceptionHandler)

      A special exception handler can be set before the session is opened and can not be changed thereafter.
      See Also:
        `CDOSession.getExceptionHandler()`

    - #### getIDGenerator

          CDOIDGenerator getIDGenerator()

      Since:
        4.1
      See Also:
        `CDOSession.getIDGenerator()`

    - #### setIDGenerator

          void setIDGenerator(CDOIDGenerator idGenerator)

      A special ID generator can be set before the session is opened and can not be changed thereafter. If not `null`, the passed generator must be thread-safe.
      Since:
        4.1
      See Also:
        `CDOSession.getIDGenerator()`

    - #### getFetchRuleManager

          CDOFetchRuleManager getFetchRuleManager()

      Since:
        4.1
      See Also:
        `CDOSession.getFetchRuleManager()`

    - #### setFetchRuleManager

          void setFetchRuleManager(CDOFetchRuleManager fetchRuleManager)

      A special ID generator can be set before the session is opened and can not be changed thereafter. If not `null`, the passed generator must be thread-safe.
      Since:
        4.1
      See Also:
        `CDOSession.getFetchRuleManager()`

    - #### getBranchManager

          CDOBranchManager getBranchManager()

      Since:
        4.2

    - #### setBranchManager

          void setBranchManager(CDOBranchManager branchManager)

      Since:
        4.2

    - #### getAuthenticator

          @Deprecated
          CDOAuthenticator getAuthenticator()

      Deprecated. As of 4.2 use `getCredentialsProvider()` and `setCredentialsProvider(IPasswordCredentialsProvider)`, respectively
      Returns the authenticator of this configuration, never `null`.

    - #### getCredentialsProvider

          IPasswordCredentialsProvider getCredentialsProvider()

      Since:
        4.2

    - #### setCredentialsProvider

          void setCredentialsProvider(IPasswordCredentialsProvider credentialsProvider)

      Since:
        4.2

    - #### isActivateOnOpen

          boolean isActivateOnOpen()

      Returns `true` if the session opened by `openSession()` will be automatically activated, `false` otherwise.

    - #### setActivateOnOpen

          void setActivateOnOpen(boolean activateOnOpen)

      Specifies whether the session opened by `openSession()` will be automatically activated or not.

    - #### isSessionOpen

          boolean isSessionOpen()

      Returns `true` if the session for this configuration is currently open, `false` otherwise.

    - #### openSession

          CDOSession openSession()

      Opens the session for this configuration. Once the session is openend this method always returns the same session instance. Therefore it is impossible to change this configuration while the session is open.

Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html