org.sapia.ubik.mcast
Interface BroadcastDispatcher

All Known Implementing Classes:
BroadcastDispatcherImpl

public interface BroadcastDispatcher

An instance of this interface dispatches multicast events.

Author:
Yanick Duchesne
Copyright:
Copyright © 2002-2003 Sapia Open Source Software. All Rights Reserved.
License:
Read the license.txt file of the jar or visit the license page at the Sapia OSS web site

Method Summary
 void close()
          Closes this instance, which can't be used thereafter.
 void dispatch(boolean alldomains, java.lang.String id, java.lang.Object data)
          Dispatches a multicast event holding the given parameters.
 void dispatch(java.lang.String domain, java.lang.String id, java.lang.Object data)
          Dispatches a multicast event to the given domain.
 java.lang.String getMulticastAddress()
          Returns this instance's multicast address.
 int getMulticastPort()
          Returns this instance's multicast port.
 java.lang.String getNode()
          Returns the node identifier of this instance.
 void setBufsize(int size)
          Sets this instance's "buffer size".
 void start()
          Starts this instance - must be called prior to using this instance.
 

Method Detail

dispatch

void dispatch(boolean alldomains,
              java.lang.String id,
              java.lang.Object data)
              throws java.io.IOException
Dispatches a multicast event holding the given parameters.

Parameters:
alldomains - if true sends an event to all domains.
id - the logical identifier of the event.
data - the data that is encapsulated within the event.
Throws:
java.io.IOException - if an IO problem occurs.

dispatch

void dispatch(java.lang.String domain,
              java.lang.String id,
              java.lang.Object data)
              throws java.io.IOException
Dispatches a multicast event to the given domain.

Parameters:
domain - the domain to dispatch the event to.
id - the logical identifier of the event.
data - the data that is encapsulated within the event.
Throws:
java.io.IOException - if an IO problem occurs.

setBufsize

void setBufsize(int size)
Sets this instance's "buffer size". The size is specified in bytes, and can be interpreted differently from one implementation to another - for example, for UDP-based implementation, it can correspond to the datagram packet size.

Parameters:
the - size of this instance's internal buffer, in bytes.

start

void start()
Starts this instance - must be called prior to using this instance.


close

void close()
Closes this instance, which can't be used thereafter.


getNode

java.lang.String getNode()
Returns the node identifier of this instance.

Returns:
this instance's node identifier.

getMulticastPort

int getMulticastPort()
Returns this instance's multicast port.

Returns:
a multicast port.

getMulticastAddress

java.lang.String getMulticastAddress()
Returns this instance's multicast address.

Returns:
a multicast address string.


Copyright © 2010 Sapia OSS. All Rights Reserved.