org.livetribe.slp.spi.net
Class UDPConnector
java.lang.Object
org.livetribe.slp.spi.net.NetworkConnector
org.livetribe.slp.spi.net.UDPConnector
- Direct Known Subclasses:
- SocketUDPConnector
public abstract class UDPConnector
- extends NetworkConnector
- Version:
- $Rev: 200 $ $Date: 2006-08-09 14:17:10 +0200 (Wed, 09 Aug 2006) $
Methods inherited from class org.livetribe.slp.spi.net.NetworkConnector |
addMessageListener, clearMessageListeners, createAcceptorPool, createAcceptors, createConnectionPool, destroyAcceptors, doStop, getInetAddresses, handle, isRunning, notifyMessageListeners, removeMessageListener, setAcceptorPool, setConnectionPool, setInetAddresses, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UDPConnector
public UDPConnector()
setMulticastTimeToLive
public void setMulticastTimeToLive(int multicastTimeToLive)
getMulticastTimeToLive
public int getMulticastTimeToLive()
getMaxTransmissionUnit
public int getMaxTransmissionUnit()
setMaxTransmissionUnit
public void setMaxTransmissionUnit(int maxTransmissionUnit)
getMulticastAddress
public InetAddress getMulticastAddress()
setMulticastAddress
public void setMulticastAddress(InetAddress multicastAddress)
getPort
public int getPort()
setPort
public void setPort(int port)
doStart
protected void doStart()
throws IOException
- Overrides:
doStart
in class NetworkConnector
- Throws:
IOException
unicastSend
public abstract DatagramSocket unicastSend(DatagramSocket socket,
InetSocketAddress address,
byte[] bytes)
throws IOException
- Sends the given bytes to the given address.
- Parameters:
socket
- The datagram socket to be used to send the bytes, or null if the datagram socket must be createdaddress
- The target address to send the bytes tobytes
- The bytes to send
- Returns:
- The datagram socket passed in, or the newly created one if
socket
was null
- Throws:
IOException
- In case of communication errors
multicastSend
public abstract DatagramSocket multicastSend(DatagramSocket socket,
InetSocketAddress address,
byte[] bytes)
throws IOException
- Sends the given bytes to the specified multicast address.
- Parameters:
socket
- The datagram socket to be used to send the bytes, or null if the datagram socket must be createdbytes
- The bytes to send
- Returns:
- The datagram socket passed in, or the newly created one if
socket
was null
- Throws:
IOException
- In case of communication errors
accept
public void accept(Runnable executor)
- Overrides:
accept
in class NetworkConnector
Copyright © 2006-2012 LiveTribe. All Rights Reserved.