tigase.jaxmpp.core.client

## Interface SessionObject

- All Superinterfaces:
    UserProperties
  All Known Implementing Classes:
    AbstractSessionObject, GwtSessionObject, J2SESessionObject

      public interface SessionObject
      extends UserProperties

  Session object is for store state of connection, modules etc. All states will be removed on reset (clear() method}).
  Author:
    bmalkow

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `SessionObject.ClearedHandler` Implemented by handlers of SessionObject.ClearedHandler.ClearedEvent.
    `static class` | `SessionObject.Scope`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DOMAIN_NAME` Name of property used to keep logical name of XMPP server.
    `static String` | `NICKNAME` Name of property used to keep users nickname
    `static String` | `PASSWORD` Name of property used to keep users password
    `static String` | `RESOURCE` Name of property used to keep XMPP resource
    `static String` | `SERVER_NAME` Deprecated.
    `static String` | `USER_BARE_JID` Name of property used to keep users JID

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Reset state.
    `void` | `clear(SessionObject.Scope... scopes)` Reset state.
    `<T> T` | `getProperty(String key)` Returns property
    `BareJID` | `getUserBareJid()` Returns users JID
    `SessionObject` | `setProperty(SessionObject.Scope scope, String key, Object value)` Set property in given scope.
    `SessionObject` | `setProperty(String key, Object value)` Set property in session scope.

    - ### Methods inherited from interface tigase.jaxmpp.core.client.UserProperties

      `getUserProperty, setUserProperty`

- - ### Field Detail

    - #### DOMAIN_NAME

          static final String DOMAIN_NAME

      Name of property used to keep logical name of XMPP server. Usually it is equals to hostname of users JID.
      See Also:
        Constant Field Values

    - #### NICKNAME

          static final String NICKNAME

      Name of property used to keep users nickname
      See Also:
        Constant Field Values

    - #### PASSWORD

          static final String PASSWORD

      Name of property used to keep users password
      See Also:
        Constant Field Values

    - #### RESOURCE

          static final String RESOURCE

      Name of property used to keep XMPP resource
      See Also:
        Constant Field Values

    - #### SERVER_NAME

          @Deprecated
          static final String SERVER_NAME

      Deprecated.
      Name of property used to keep logical name of XMPP server. Usually it is equals to hostname of users JID.
      See Also:
        Constant Field Values

    - #### USER_BARE_JID

          static final String USER_BARE_JID

      Name of property used to keep users JID
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### clear

          void clear()
              throws JaxmppException

      Reset state. Clears all properties stored by modules, roster and presence store. Users properties are keeped.
      Throws:
        `JaxmppException`

    - #### clear

          void clear(SessionObject.Scope... scopes)
              throws JaxmppException

      Reset state. Clears given properties stored by modules. Roster and presence store will be cleared if SessionObject.Scope.session is in parameters.
      Throws:
        `JaxmppException`

    - #### getProperty

          <T> T getProperty(String key)

      Returns property
      Parameters:
        `key` - property name
      Returns:
        property

    - #### getUserBareJid

          BareJID getUserBareJid()

      Returns users JID
      Returns:

    - #### setProperty

          SessionObject setProperty(SessionObject.Scope scope,
                                    String key,
                                    Object value)

      Set property in given scope.
      Parameters:
        `scope` - scope of property
        `key` - property name
        `value` - property value. `null` to unset property.
      Returns:
        instance of `this` SessionObject

    - #### setProperty

          SessionObject setProperty(String key,
                                    Object value)

      Set property in session scope.
      Parameters:
        `key` - property name
        `value` - property value. `null` to unset property.
      Returns:
        instance of `this` SessionObject

Copyright © 2006–2016 Tigase. All rights reserved.