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

## com.compoze.collab.im
Interface IImSession

All Superinterfaces:
  ISession, java.io.Serializable

All Known Subinterfaces:
  ILcsSession, IYahooSession

public interface IImSession
extends ISession

Extends the collab `ISession` with additional instant messaging specific functionality. See the package description for the IM package for more information on how to use the API.

Field Summary
`static java.lang.String` | `PROP_IM_PASSWORD` Session property for the IM password.
`static java.lang.String` | `PROP_IM_PORT` Session property for the port of the server to use when connecting to the IM server.
`static java.lang.String` | `PROP_IM_PROTOCOL` Session property for the protocol to use when connecting to the IM server.
`static java.lang.String` | `PROP_IM_SERVER` Session property for the hostname of the server to use when connecting to the IM server.
`static java.lang.String` | `PROP_IM_USERNAME` Session property for the IM username.

Fields inherited from interface com.compoze.collab.ISession
`PROP_ADMIN_LOCALE, PROP_AUTO_FETCH, PROP_CACHE_DEPENDENCY_CHECK_MILLIS, PROP_CACHE_ENABLED, PROP_CACHE_QUERY_MAX, PROP_CACHE_UPDATE_MILLIS, PROP_CACHE_USE_SOFT_REFERENCES, PROP_LOCALE, PROP_LOG_LEVEL, PROP_PROGRAMMER_LOCALE, PROP_PROVIDER, PROP_SCHEMA, PROPVALUE_REMOVE, STATE_AUTHENTICATED, STATE_INITIALIZED, STATE_OPEN, STATE_UNINITIALIZED`

Method Summary
`void` | `addImListener(IImListener listener)` Adds a listener for events related to this session.
`void` | `removeImListener(IImListener listener)` Removes a listener for events related to this session.
`void` | `setPresence(FriendStatus status)` Sets the presence status of the current user.
`void` | `setTypingStatus(IFriend friend, boolean bTyping)` Does the same thing as `setTypingStatus(String,boolean)`, but accepts an `IFriend` reference instead of a user name
`void` | `setTypingStatus(java.lang.String sUsername, boolean bTyping)` Indicates that the user is typing a message to a specific user.

Methods inherited from interface com.compoze.collab.ISession
`addLogListener, close, endProfile, endTimer, endTimer, getAdminLocale, getAttribute, getDefaultRootContainer, getDefaultRootContainer, getLocale, getLogLevel, getOption, getOptions, getProgrammerLocale, getProperty, getProvider, getState, invalidateCache, isCapabilitySupported, log, login, login, logout, open, open, removeAttribute, setAdminLocale, setAttribute, setLocale, setLogLevel, setOption, setOptions, setProgrammerLocale, startProfile, startProfile, startTimer, startTimer`

Field Detail

### PROP_IM_USERNAME

    public static final java.lang.String PROP_IM_USERNAME

  Session property for the IM username.

### PROP_IM_PASSWORD

    public static final java.lang.String PROP_IM_PASSWORD

  Session property for the IM password.

### PROP_IM_PROTOCOL

    public static final java.lang.String PROP_IM_PROTOCOL

  Session property for the protocol to use when connecting to the IM server. The available protocols are IM provider dependent, and may include `tcp` or `http`.

### PROP_IM_SERVER

    public static final java.lang.String PROP_IM_SERVER

  Session property for the hostname of the server to use when connecting to the IM server. For consumer IM services such as Yahoo, AIM and MSN, this property is usually not specified because the defaults will use a well-known hostname.

### PROP_IM_PORT

    public static final java.lang.String PROP_IM_PORT

  Session property for the port of the server to use when connecting to the IM server. For consumer IM services such as Yahoo, AIM and MSN, this properties is usually not specified because the defaults will use a well-known port.

Method Detail

### setTypingStatus

    public void setTypingStatus(java.lang.String sUsername,
                                boolean bTyping)
                         throws CollaborationException

  Indicates that the user is typing a message to a specific user. Depending on the provider, this could mean that the recipient is then notified that the user is typing. If you set the typing status to `true`, you should set it back to `false` after the user has stopped typing. It is not appropriate to do this right after a key is pressed, but after a delay in your application of a few seconds. When you finally call `IMessage.send()` on a message, the typing status is automatically set to `false` for the user that you're sending to, so there's is no need to do this before sending the message (in fact, it is not desirable to do because it will cause extra network traffic to send an unneeded typing notification).
  Parameters:
    `sUsername` - the user to send the typing status to (not `null`)
    `bTyping` - if `true`, the user is type, if `false` then the user is not typing
  Throws:
    `CollaborationException` - (if the typing notification could not be sent)

### setTypingStatus

    public void setTypingStatus(IFriend friend,
                                boolean bTyping)
                         throws CollaborationException

  Does the same thing as `setTypingStatus(String,boolean)`, but accepts an `IFriend` reference instead of a user name
  Parameters:
    `friend` - the user to send the typing status to (not `null`)
    `bTyping` - if `true`, the user is type, if `false` then the user has finished
  Throws:
    `CollaborationException` - CollaborationException (if the typing notification could not be sent)

### setPresence

    public void setPresence(FriendStatus status)
                     throws CollaborationException

  Sets the presence status of the current user.
  Parameters:
    `status` - the status (not `null`)

### addImListener

    public void addImListener(IImListener listener)
                       throws CollaborationException

  Adds a listener for events related to this session.
  Parameters:
    `listener` - the IM listener (not `null`, and must implement `Serializable` if the session is to be serialized)

### removeImListener

    public void removeImListener(IImListener listener)
                          throws CollaborationException

  Removes a listener for events related to this session.
  Parameters:
    `listener` - the listener to remove (not `null`)

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

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