|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectus.ihmc.mockets.Params
public class Params
Class to be used to encapsulate the communication parameters into a single object.
Constructor Summary | |
---|---|
Params(int tag,
short priority,
long enqueueTimeout,
long retryTimeout)
Created a new object with the specified parameters. |
Method Summary | |
---|---|
protected void |
finalize()
Removes params object. |
long |
getEnqueueTimeout()
Native method to extract the enqueue timeout that indicates the length of time in milliseconds for which the method will wait if there is no room in the outgoing buffer. |
short |
getPriority()
Native method to extract the priority. |
long |
getRetryTimeout()
Native method to extract the retry timeout from Params. |
int |
getTag()
Native method to extract the tag. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Params(int tag, short priority, long enqueueTimeout, long retryTimeout) throws java.io.IOException, java.lang.IllegalArgumentException
tag
- integer value that can be used to mark a flow of messages belonging to
the same type. The value has to be >0.priority
- used to assign a priority different than the default one (higher or lower).
The value has to be >0. Note that the priority of a message will grow every
time it is skipped in favor of a higher priority messages that gets sent first.
This mechanism is implemented to avoid message starvation. The range of priority
values is 0-255.enqueueTimeout
- indicates the length of time in milliseconds for which the method will wait
if there is no room in the outgoing buffer. A zero value indicates wait forever.retryTimeout
- indicates the length of time for which the transmitter will retransmit the packet
to ensure successful delivery. A zero value indicates retry with no time limit.
Note that this parameter makes sense only if the flow is reliable, otherwise the
behavior is to transmit and forget about the packet.
java.io.IOException
java.lang.IllegalArgumentException
Mocket.Sender.send(byte[], us.ihmc.mockets.Params)
,
Mocket.Sender.send(byte[], int, int, us.ihmc.mockets.Params)
Method Detail |
---|
protected void finalize()
params
object.
finalize
in class java.lang.Object
public int getTag() throws java.io.IOException, java.lang.IllegalArgumentException
java.io.IOException
java.lang.IllegalArgumentException
public short getPriority() throws java.io.IOException, java.lang.IllegalArgumentException
java.io.IOException
java.lang.IllegalArgumentException
public long getEnqueueTimeout() throws java.io.IOException, java.lang.IllegalArgumentException
java.io.IOException
java.lang.IllegalArgumentException
public long getRetryTimeout() throws java.io.IOException, java.lang.IllegalArgumentException
java.io.IOException
java.lang.IllegalArgumentException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |