Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol.jabberconstants
Class JabberStatusEnum

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.jabberconstants.JabberStatusEnum

public class JabberStatusEnum
extends Object

The JabberStatusEnum gives access to presence states for the Sip protocol. All status icons corresponding to presence states are located with the help of the imagePath parameter

Author:
Emil Ivov, Yana Stamcheva, Lubomir Marinov

Field Summary
static String AVAILABLE
          The Online status.
static String AWAY
          The Away status.
static String DO_NOT_DISTURB
          The DND status.
static String EXTENDED_AWAY
          The Free For Chat status.
static String FREE_FOR_CHAT
          The Free For Chat status.
static String OFFLINE
          Indicates an Offline status or status with 0 connectivity.
static String ON_THE_PHONE
          On The Phone Chat status.
 List<PresenceStatus> supportedStatusSet
          The supported status set stores all statuses supported by this protocol implementation.
static String UNKNOWN
          The Unknown status.
 
Method Summary
static JabberStatusEnum getJabberStatusEnum(String iconPath)
          Returns an instance of JabberStatusEnum for the specified iconPath or creates a new one if it doesn't already exist.
 net.java.sip.communicator.service.protocol.jabberconstants.JabberStatusEnum.JabberPresenceStatus getStatus(String statusName)
          Returns the offline Jabber status.
static String[] getStatusNames()
          Get all status name as array.
 Iterator<PresenceStatus> getSupportedStatusSet()
          Returns an iterator over all status instances supported by the sip provider.
static byte[] loadIcon(String imagePath)
          Loads an image from a given image path.
static byte[] loadIcon(String imagePath, Class<?> clazz)
          Loads the icon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AVAILABLE

public static final String AVAILABLE
The Online status. Indicate that the user is able and willing to communicate.

See Also:
Constant Field Values

AWAY

public static final String AWAY
The Away status. Indicates that the user has connectivity but might not be able to immediately act upon initiation of communication.

See Also:
Constant Field Values

DO_NOT_DISTURB

public static final String DO_NOT_DISTURB
The DND status. Indicates that the user has connectivity but prefers not to be contacted.

See Also:
Constant Field Values

FREE_FOR_CHAT

public static final String FREE_FOR_CHAT
The Free For Chat status. Indicates that the user is eager to communicate.

See Also:
Constant Field Values

ON_THE_PHONE

public static final String ON_THE_PHONE
On The Phone Chat status. Indicates that the user is talking to the phone.

See Also:
Constant Field Values

EXTENDED_AWAY

public static final String EXTENDED_AWAY
The Free For Chat status. Indicates that the user is eager to communicate.

See Also:
Constant Field Values

OFFLINE

public static final String OFFLINE
Indicates an Offline status or status with 0 connectivity.

See Also:
Constant Field Values

UNKNOWN

public static final String UNKNOWN
The Unknown status. Indicate that we don't know if the user is present or not.

See Also:
Constant Field Values

supportedStatusSet

public final List<PresenceStatus> supportedStatusSet
The supported status set stores all statuses supported by this protocol implementation.

Method Detail

getJabberStatusEnum

public static JabberStatusEnum getJabberStatusEnum(String iconPath)
Returns an instance of JabberStatusEnum for the specified iconPath or creates a new one if it doesn't already exist.

Parameters:
iconPath - the location containing the status icons that should be used by this enumeration.
Returns:
the newly created JabberStatusEnum instance.

getStatus

public net.java.sip.communicator.service.protocol.jabberconstants.JabberStatusEnum.JabberPresenceStatus getStatus(String statusName)
Returns the offline Jabber status.

Parameters:
statusName - the name of the status.
Returns:
the offline Jabber status.

getSupportedStatusSet

public Iterator<PresenceStatus> getSupportedStatusSet()
Returns an iterator over all status instances supported by the sip provider.

Returns:
an Iterator over all status instances supported by the sip provider.

getStatusNames

public static String[] getStatusNames()
Get all status name as array.

Returns:
array of String representing the different status name

loadIcon

public static byte[] loadIcon(String imagePath)
Loads an image from a given image path.

Parameters:
imagePath - The path to the image resource.
Returns:
The image extracted from the resource at the specified path.

loadIcon

public static byte[] loadIcon(String imagePath,
                              Class<?> clazz)
Loads the icon.

Parameters:
imagePath - path of the image
clazz - class name
Returns:
the image bytes

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.