Package org.hcjf.io.net.broadcast
Interface BroadcastConsumer
-
- All Superinterfaces:
ServiceConsumer
- All Known Implementing Classes:
CloudBroadcastConsumer
public interface BroadcastConsumer extends ServiceConsumer
This interface provides all the methods as needed to register a broadcast consumer.- Author:
- javaito
-
-
Method Summary
Modifier and Type Method Description java.lang.StringgetIpVersion()Returns the ip version tojava.lang.StringgetNetInterfaceName()Returns the name of the net interface to broadcast messages.java.util.Map<java.lang.String,java.lang.Object>getPingParameters()Returns the map with the implementation parameters for the broadcast ping message.java.lang.IntegergetPort()Returns the port to initialize the broadcast server.java.lang.StringgetPrivateKey()Returns the private key for the consumer.java.lang.StringgetTaskName()Returns the name of the task.voidonPing(BroadcastService.PingMessage pingMessage)This method is invoked when the instance receive a broadcast ping message.voidonPong(BroadcastService.PongMessage pongMessage)This method is invoked when the instance receive a broadcast pong message.voidonShutdown(BroadcastService.ShutdownMessage shutdownMessage)This method is invoked when the instance receive a broadcast shutdown massage.
-
-
-
Method Detail
-
getTaskName
java.lang.String getTaskName()
Returns the name of the task.- Returns:
- Task name.
-
getPrivateKey
java.lang.String getPrivateKey()
Returns the private key for the consumer.- Returns:
- Private key.
-
getIpVersion
java.lang.String getIpVersion()
Returns the ip version to- Returns:
- Return the ip version.
-
getNetInterfaceName
java.lang.String getNetInterfaceName()
Returns the name of the net interface to broadcast messages.- Returns:
- Net interface name.
-
getPort
java.lang.Integer getPort()
Returns the port to initialize the broadcast server.- Returns:
- Port.
-
getPingParameters
java.util.Map<java.lang.String,java.lang.Object> getPingParameters()
Returns the map with the implementation parameters for the broadcast ping message.- Returns:
- Parameters map.
-
onPing
void onPing(BroadcastService.PingMessage pingMessage)
This method is invoked when the instance receive a broadcast ping message.- Parameters:
pingMessage- Broadcast ping message.
-
onPong
void onPong(BroadcastService.PongMessage pongMessage)
This method is invoked when the instance receive a broadcast pong message.- Parameters:
pongMessage- Broadcast pong message.
-
onShutdown
void onShutdown(BroadcastService.ShutdownMessage shutdownMessage)
This method is invoked when the instance receive a broadcast shutdown massage.- Parameters:
shutdownMessage- Broadcast shutdown message.
-
-