public class

SSDPSocket

extends Object
java.lang.Object
   ↳ org.ocast.discovery.SSDPSocket

Summary

Nested Classes
interface SSDPSocket.Listener  
Public Constructors
SSDPSocket()
Public Methods
void close()
Close the SSDPSocket
void init(boolean joinGroup)
Initialize the socket
List<SSDPMessage> read(int timeout, SSDPSocket.Listener responseListener)
Read data on the multicast channel
void send(SSDPMessage message)
Send a SSDPMessage, typically M-SEARCH
Protected Methods
MulticastSocket createSocket()
Allow subclass to customize the socket creation
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SSDPSocket ()

Public Methods

public void close ()

Close the SSDPSocket

public void init (boolean joinGroup)

Initialize the socket

Parameters
joinGroup flag to tell whether we should join the multicast group to manage NOTIFY
Throws
IOException

public List<SSDPMessage> read (int timeout, SSDPSocket.Listener responseListener)

Read data on the multicast channel

Parameters
timeout amount of time the method should wait for data
responseListener the object to be notified just in time
Returns
  • a List of SSDPMessage received until timeout
Throws
IOException

public void send (SSDPMessage message)

Send a SSDPMessage, typically M-SEARCH

Parameters
message to be sent
Throws
IOException

Protected Methods

protected MulticastSocket createSocket ()

Allow subclass to customize the socket creation

Returns
  • a MulticastSocket
Throws
IOException