public interface BroadcastEndpoint
JGroupsBroadcastEndpoint
,
UDPBroadcastEndpoint
Modifier and Type | Method and Description |
---|---|
void |
broadcast(byte[] data)
Broadcasting data to the cluster.
|
void |
close(boolean isBroadcast)
Close the endpoint.
|
void |
openBroadcaster()
This method initializes a BroadcastEndpint as
a broadcaster.
|
void |
openClient()
This method initializes a BroadcastEndpoint as
a receiving end for broadcasts.
|
byte[] |
receiveBroadcast()
Receives the broadcast data.
|
byte[] |
receiveBroadcast(long time,
TimeUnit unit)
Receives the broadcast data with a timeout.
|
void openClient() throws Exception
Exception
void openBroadcaster() throws Exception
Exception
void close(boolean isBroadcast) throws Exception
isBroadcast
- : indicates whether this endpoint serves as a broadcast or not.Exception
void broadcast(byte[] data) throws Exception
data
- : a byte array containing the data.Exception
byte[] receiveBroadcast() throws Exception
Exception
byte[] receiveBroadcast(long time, TimeUnit unit) throws Exception
time
- : how long the method should wait for the data to arrive.unit
- : unit of the time.Exception
Copyright © 2018 JBoss by Red Hat. All rights reserved.