|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.multicast.reliable.transport.um.UMPacketSocket
An RMPacketSocket for the Unreliable Multicast transport.
The only transport-specific public methods that are added by this class are getSoTimeout and setSoTimeout, which allow a timeout to be specified for the receive method.
RMPacketSocket
Method Summary | |
void |
abort()
Abort the current connection. |
void |
close()
The close method shuts down the socket after flushing the transmit queue. |
long |
getDataRate()
|
java.net.InetAddress |
getInterface()
The getInterface method returns the InetAddress of the local port that data is transmitted on if other than the default. |
int |
getMaxLength()
Gets the maximum amount of data that can be sent in a DatagramPacket over this socket. |
RMStatistics |
getRMStatistics()
Returns the latest snapshot of the maintained Transport statistics block. |
int |
getSoTimeout()
Return the SO_TIMEOUT setting in milliseconds. |
TransportProfile |
getTransportProfile()
Return a copy of the transport profile this socket is using. |
java.net.DatagramPacket |
receive()
The receive method returns the next RMDatagramPacket. |
void |
send(java.net.DatagramPacket dp)
The send method transmits a DatagramPacket over the multicast connection. |
void |
send(java.net.DatagramPacket dp,
byte ttl)
The send method transmits a DatagramPacket over the multicast connection. |
void |
setDataRate(long dataRate)
Change the current data rate value. |
void |
setInterface(java.net.InetAddress ia)
Set the interface which data will be transmitted on. |
void |
setSoTimeout(int timeout)
Set the SO_TIMEOUT value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public java.net.InetAddress getInterface() throws java.net.SocketException
getInterface
in interface RMPacketSocket
com.sun.multicast.reliable.transport.RMPacketSocket
java.net.SocketException
- if a socket-related error occursUnsupportedException
- if the transport does not
support getting the interfaceRMException
- if a reliable-multicast-related exception occurspublic TransportProfile getTransportProfile()
getTransportProfile
in interface RMPacketSocket
public RMStatistics getRMStatistics() throws UnsupportedException
getRMStatistics
in interface RMPacketSocket
UnsupportedException
- this method is not supported.public void setInterface(java.net.InetAddress ia) throws java.net.SocketException
setInterface
in interface RMPacketSocket
ia
- the InetAddress of the interface to transmit data on.public void send(java.net.DatagramPacket dp) throws java.io.IOException
send
in interface RMPacketSocket
dp
- the DatagramPacket to be sent.java.io.IOException
- is raised if an error occurs sending the data.public void send(java.net.DatagramPacket dp, byte ttl) throws java.io.IOException
dp
- the DatagramPacket to be sent.ttl
- optional time to live the the multicast packet.java.io.IOException
- is raised if an error occurs sending the data.public java.net.DatagramPacket receive() throws java.io.IOException
receive
in interface RMPacketSocket
java.io.IOException
- is thrown if an error occurs retrieving the
data.public void abort()
abort
in interface RMPacketSocket
public void close()
close
in interface RMPacketSocket
public int getSoTimeout() throws java.net.SocketException
java.net.SocketException
- if the multicast socket is invalid.public void setSoTimeout(int timeout) throws java.net.SocketException
timeout
- the time in milliseconds to wait for data to be returned.java.net.SocketException
- if the multicast socket is invalid.public long getDataRate()
public void setDataRate(long dataRate)
dataRate
- the rate in bytes/second to transmit data.public int getMaxLength()
getMaxLength
in interface RMPacketSocket
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaTM Reliable MulticastTM Service version 1.1
Copyright (c) 2001, Sun Microsystems Laboratories, All rights reserved.