|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--info.jedi.net.OutputPacket
Class OutputPacket represents a packet being sent. It keeps track of the socket the packet will be sent from, the byte array that the packet data is stored in, and a DataOutputStream to write that data. It contains methods to send a packet and to resend it if it didn't arrive at the destination. Needs to be updated for handlers that require special callbacks
MailDaemon
Field Summary | |
java.io.DataOutputStream |
_stream
Use this stream to write data to this OutputPacket |
Constructor Summary | |
OutputPacket(java.net.InetAddress address,
int port,
HandlerStack stack)
Creates a packet to be sent on the default socket of this MailDaemon. |
|
OutputPacket(java.net.InetAddress address,
int port,
HandlerStack stack,
int timeout)
Creates a packet to be sent on the default socket of this MailDaemon. |
Method Summary | |
java.net.InetAddress |
address()
The internet address this packet came from or is going to |
java.net.DatagramPacket |
getPacket()
Creates a DatagramPacket with all the information in this OutputPacket. |
int |
id()
The id of this packet. |
int |
port()
The port this packet came from or is going to |
void |
send()
Orders the handler stack to finish up creating this packet and send it off with the appropriate handler. |
HandlerStack |
stack()
The protocol stack for sending this packet |
java.io.DataOutputStream |
stream()
The stream for writing data to this OutputPacket |
long |
time()
The sending timestamp of this packet. |
int |
timeout()
Returns the timeout of this packet, in ms |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public java.io.DataOutputStream _stream
Constructor Detail |
public OutputPacket(java.net.InetAddress address, int port, HandlerStack stack, int timeout) throws java.io.IOException
public OutputPacket(java.net.InetAddress address, int port, HandlerStack stack) throws java.io.IOException
Method Detail |
public java.net.InetAddress address()
public int port()
public int id()
public long time()
public int timeout()
public java.net.DatagramPacket getPacket()
public void send() throws java.io.IOException
public java.io.DataOutputStream stream()
public HandlerStack stack()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |