|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMessage
A message that is sent or received on the IM server.
Field Summary | |
---|---|
static int |
AUTH_ACCEPT
The message type for notices that the sender has accepted the recipient's request to add them to their Buddy List and view their online presence. |
static int |
AUTH_DECLINE
The message type for notices that the sender has declined the recipient's request to add them to their Buddy List and view their online presence. |
static int |
AUTH_REPLY
Deprecated. As of 2.1, use AUTH_ACCEPT or
AUTH_DECLINE . |
static int |
AUTH_REQUEST
The message type for notices that the sender is requesting the recipient's authorization to add them to their Buddy List and view their online presence. |
static int |
AUTO_RESPONSE
The message type for messages sent in response to other messages. |
static int |
CUSTOM_AWAY
The message type for AIM custom away message responses. |
static int |
ERROR
The message type for error messages. |
static int |
IM
The message type for Instant Messages. |
static int |
IM_OFFLINE
The message type for messages that are received while the client is offline. |
static int |
TYPING
The message type for notices that the sender is typing a message. |
static int |
TYPING_OFF
The message type for notices that the sender has paused or stopped typing a message. |
static int |
WARNING
The message type for warning messages. |
Method Summary | |
---|---|
String |
getMessage()
Returns the contents of this message. |
String |
getRecipient()
Returns the unique name of the user who is to receive this message. |
RichContent |
getRichContent()
Returns this message's rich content. |
String |
getSender()
Returns the unique name of the user who is sending this message. |
int |
getSeqNum()
Returns this message's sequence number. |
Date |
getTimeStamp()
Returns the date and time when this message was sent (for outgoing messages) or received (for incoming messages). |
int |
getType()
Returns this message's type. |
boolean |
isAutoResponse()
Deprecated. Automatic response messages will return the AUTO_RESPONSE type. |
Field Detail |
---|
static final int IM
static final int IM_OFFLINE
As of 6.1, for AIM and ICQ, IM_OFFLINE can be used to allow a message to be sent to an offline user (they'll receive the message next time they sign on). Normal IMs sent to offline users will cause the server to return an error.
Valid for ICQ, JABBER, YIM.
static final int AUTO_RESPONSE
static final int TYPING
static final int TYPING_OFF
Valid for AIM, ICQ, JABBER, SAMETIME, YIM.
static final int CUSTOM_AWAY
Valid for AIM.
IAimClient.requestAwayMessage(java.lang.String)
,
Constant Field Valuesstatic final int AUTH_ACCEPT
For MSN, this causes the recipient to be added to our Permit List.
Valid for ICQ, JABBER, LCS (receive only), MSN (send only), YIM.
static final int AUTH_DECLINE
For MSN, this causes the recipient to be added to our Deny List.
Valid for ICQ, JABBER, LCS (receive only), MSN (send only), YIM.
static final int AUTH_REQUEST
This notice is automatically sent when attempting to add a user to your Buddy List, and doesn't explicitly need to be sent, unless you wish to re-request authorization from that user later.
AIM does not currently support notification when a user has added you to their Buddy List.
On MSN, you receive this message only when your Reverse List prompt is true (it is by default), your name has been added to the sender's Buddy List, and the sender's name is not in your Permit List. Authorization is accepted if you add the sender to your Permit List, and declined if you add them to your Deny List.
Valid for ICQ, JABBER, LCS (receive only), MSN (receive only), YIM (receive only).
static final int AUTH_REPLY
AUTH_ACCEPT
or
AUTH_DECLINE
.Valid for ICQ, MSN.
static final int WARNING
If the message was received in
incomingMessage
, it indicates a warning
issued by another user. If it was received in
adminMessage
, it is a system warning
message.
For AIM and ICQ, a system warning is sent when you exceed the server rate limit (by sending too many messages in a short amount of time). It also indicates that a message was dropped by the server. If this happens, you should stop sending messages for 20-30 seconds or more; otherwise, you risk having further messages dropped, or being disconnected from the server.
IAimClient.warnUser(java.lang.String, boolean)
,
IJscClient.warnUser(java.lang.String, boolean)
,
Constant Field Valuesstatic final int ERROR
Method Detail |
---|
int getType()
String getSender()
"JBuddy"
.
IClient.getProtocolName() + " IM SERVER"
.
String getRecipient()
String getMessage()
IClient.setPlainTextMode(int)
RichContent getRichContent() throws Exception
Exception
- if the rich content could not be parsedDate getTimeStamp()
boolean isAutoResponse()
AUTO_RESPONSE
type.
Valid for AIM, YIM.
int getSeqNum()
This number increases for subsequent messages, and is unique for each message received by a particular client. If this message will be sent through a client, its sequence number will be -1 until it has been successfully sent.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |