|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.npsnet.xrti.MessageChannel
org.npsnet.xrti.InternetMessageChannel
An Internet message channel. Uses TCP for reliable/in-order message delivery and UDP for unreliable/out-of-order delivery.
| Constructor Summary | |
InternetMessageChannel(java.net.Socket federateSocket)
Constructor for channels from federates. |
|
InternetMessageChannel(java.lang.String executiveHost,
int executivePort)
Constructor for channels to the XRTI Executive. |
|
| Method Summary | |
void |
close()
Closes this channel. |
java.io.InputStream |
getInputStream()
Returns the InputStream corresponding to the
reliable component of this channel. |
int |
getMaximumPacketSize()
Returns the maximum packet size supported by the best-effort component of this channel. |
java.io.OutputStream |
getOutputStream()
Returns the OutputStream corresponding to the
reliable component of this channel. |
boolean |
isClosed()
Checks whether or not this channel is closed. |
void |
receivePacket(java.net.DatagramPacket packet)
Receives a packet through the best-effort component of this channel. |
void |
sendPacket(java.net.DatagramPacket packet)
Sends a packet through the best-effort component of this channel. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public InternetMessageChannel(java.lang.String executiveHost,
int executivePort)
throws java.io.IOException
executiveHost - the host name of the XRTI ExecutiveexecutivePort - the port number of the XRTI Executive
java.io.IOException - if an error occurs
public InternetMessageChannel(java.net.Socket federateSocket)
throws java.io.IOException
federateSocket - the newly accepted federate socket
java.io.IOException - if an error occurs| Method Detail |
public int getMaximumPacketSize()
getMaximumPacketSize in class MessageChannel
public void sendPacket(java.net.DatagramPacket packet)
throws java.io.IOException
sendPacket in class MessageChannelpacket - the packet to send
java.io.IOException - if an error occurs
public void receivePacket(java.net.DatagramPacket packet)
throws java.io.IOException
receivePacket in class MessageChannelpacket - the object to contain the received packet
java.io.IOException - if an error occurs
public java.io.InputStream getInputStream()
throws java.io.IOException
InputStream corresponding to the
reliable component of this channel.
getInputStream in class MessageChanneljava.io.IOException - in an error occurs
public java.io.OutputStream getOutputStream()
throws java.io.IOException
OutputStream corresponding to the
reliable component of this channel.
getOutputStream in class MessageChanneljava.io.IOException - if an error occurs
public void close()
throws java.io.IOException
close in class MessageChanneljava.io.IOException - if an error occurspublic boolean isClosed()
isClosed in class MessageChanneltrue if this channel has been closed,
false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||