|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectParamInfo
A data structure containing various settings related to instant messaging.
Field Summary | |
static long |
FLAG_CHANMSGS_ALLOWED
A bit mask indicating something. |
static long |
FLAG_MISSEDCALLS_ALLOWED
A bit mask indicating that receiving MissedMessagesCmd s is
supported. |
static long |
FLAG_TYPING_NOTIFICATION
A bit mask indicating that receiving RecvTypingNotification s is
supported. |
static int |
MAXCHAN_DEFAULT
The value of "max channel" that the client must send when setting parameter information. |
Constructor Summary | |
ParamInfo(int maxChannel,
long flags,
int maxMsgLen,
int maxSenderWarning,
int maxReceiverWarning,
long minMsgInterval)
Creates a new outgoing parameter information block with the given properties. |
|
ParamInfo(long flags,
int maxMsgLen,
int maxSenderWarning,
int maxReceiverWarning,
long minMsgInterval)
Creates a new outgoing parameter information block with the given properties and a "max channel" of MAXCHAN_DEFAULT . |
Method Summary | |
long |
getFlags()
Returns the "flags" associated with this parameter information block. |
int |
getMaxChannel()
Returns the maximum ICBM channel supported on this connection. |
int |
getMaxMsgLen()
Returns the maximum length, in bytes, of an IM that can be sent to or from the client. |
int |
getMaxReceiverWarning()
Returns the maximum warning level necessary for receiving IM's by the client or those sent by the client to another user, as a percentage times 10. |
int |
getMaxSenderWarning()
Returns the maximum warning level necessary for sending IM's to or from the client, as a percentage times 10. |
long |
getMinMsgInterval()
Returns the minimum time interval, in milliseconds, between any two messages sent or recieved by the client. |
long |
getWritableLength()
Returns the length of the data that was or will be written in a call to write . |
protected static ParamInfo |
readParamInfo(ByteBlock block)
Returns an ICBM parameter information block read from the given block of binary data. |
java.lang.String |
toString()
|
void |
write(java.io.OutputStream out)
Writes a representation of this object to the given stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int MAXCHAN_DEFAULT
public static final long FLAG_CHANMSGS_ALLOWED
ParamInfoCmd
, this bit is set.
public static final long FLAG_MISSEDCALLS_ALLOWED
MissedMessagesCmd
s is
supported.
public static final long FLAG_TYPING_NOTIFICATION
RecvTypingNotification
s is
supported.
Constructor Detail |
public ParamInfo(long flags, int maxMsgLen, int maxSenderWarning, int maxReceiverWarning, long minMsgInterval)
MAXCHAN_DEFAULT
. Normally
MAXCHAN_DEFAULT
is required for setting parameter information as
a client.
flags
argument can be constructed as such:
new ParamInfo(ParamInfo.FLAGS_MISSEDCALLS_ALLOWED | ParamInfo.FLAGS_TYPING_NOTIFICATION | ParamInfo.FLAGS_CHANMSGS_ALLOWED, ...);
flags
- a set of flags, like FLAG_TYPING_NOTIFICATION
(WinAIM uses FLAGS_MISSEDCALLS_ALLOWED
| FLAGS_TYPING_NOTIFICATION | FLAGS_CHANMSGS_ALLOWED
)maxMsgLen
- the maximum length of an IM that can be sent from or
to the client (WinAIM uses 8000
)maxSenderWarning
- the maximum warning level of either the client
or those sending messages to the client, as a percentage times ten
(WinAIM uses 999
, for 99.9%
)maxReceiverWarning
- the maximum warning level of either the client
or those to whom the client is sending messages, as a percentage
times ten (WinAIM uses 999
, for 99.9%
)minMsgInterval
- the minimum time interval necessary for sending
messages to or from the client, in milliseconds (WinAIM uses
0
)public ParamInfo(int maxChannel, long flags, int maxMsgLen, int maxSenderWarning, int maxReceiverWarning, long minMsgInterval)
flags
argument can be constructed as such:
new ParamInfo(ParamInfo.FLAGS_MISSEDCALLS_ALLOWED | ParamInfo.FLAGS_TYPING_NOTIFICATION | ParamInfo.FLAGS_CHANMSGS_ALLOWED, ...);
maxChannel
- the highest ICBM channel supported on this connection;
note that this normally must be 0
when setting ICBM parameters as a clientflags
- a set of flags, like FLAG_TYPING_NOTIFICATION
(WinAIM uses FLAGS_MISSEDCALLS_ALLOWED
| FLAGS_TYPING_NOTIFICATION | FLAGS_CHANMSGS_ALLOWED
)maxMsgLen
- the maximum length of an IM that can be sent from or
to the client (WinAIM uses 8000
)maxSenderWarning
- the maximum warning level of either the client
or those sending messages to the client, as a percentage times ten
(WinAIM uses 999
, for 99.9%
)maxReceiverWarning
- the maximum warning level of either the client
or those to whom the client is sending messages, as a percentage
times ten (WinAIM uses 999
, for 99.9%
)minMsgInterval
- the minimum time interval necessary for sending
messages to or from the client, in milliseconds (WinAIM uses
0
)Method Detail |
protected static ParamInfo readParamInfo(ByteBlock block)
block
- the block of data containing ICBM parameter information
public final int getMaxChannel()
2
when coming from a server, 0
when
coming from a client.
public final long getFlags()
FLAG_CHANMSGS_ALLOWED
,
FLAG_MISSEDCALLS_ALLOWED
, and FLAG_TYPING_NOTIFICATION
.
The presence of these values can be accessed as such:
if ((paramInfo.getFlags() & ParamInfo.FLAG_TYPING_NOTIFICATION) != 0) { System.out.println("Typing notification is supported!"); }
public final int getMaxMsgLen()
public final int getMaxSenderWarning()
999
,
for 99.9%
.
public final int getMaxReceiverWarning()
999
, for 99.9%
.
public final long getMinMsgInterval()
public long getWritableLength()
Writable
write
. The value returned by this method must not
change after its first invocation.
getWritableLength
in interface Writable
write
public void write(java.io.OutputStream out) throws java.io.IOException
Writable
getWritableLength
.
write
in interface Writable
out
- the stream to which to write
java.io.IOException
- if an I/O error occurspublic java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |