Package de.hybris.platform.cluster.udp
Class UnicastBroadcastMethod
java.lang.Object
de.hybris.platform.cluster.AbstractBroadcastMethod
de.hybris.platform.cluster.udp.UnicastBroadcastMethod
- All Implemented Interfaces:
BroadcastMethod
The Unicast UDP based broadcasting method.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaccept(RawMessage msg) protected ConfigIntfProvides generic access to method specific settingsvoidinit(BroadcastService service) Called once when the messaging method has been registeredprotected booleanisOwnAddress(InetSocketAddress nodeAddress) booleanprotected voidnotifyMessgageReceived(RawMessage message) protected voidprocessDatagramPacket(DatagramPacket packet) protected voidprotected voidprotected voidprotected InetSocketAddressresolveAddress(InetSocketAddress unresolvedAddress) protected Set<InetSocketAddress>resolveAddresses(Collection<InetSocketAddress> unresolvedAddresses) voidsend(RawMessage message) Sends the givenRawMessage.protected voidsendPacket(DatagramPacket packet) voidvoidshutdown()Called before system shutdownprotected voidstart()protected voidprotected DatagramSocketMethods inherited from class de.hybris.platform.cluster.AbstractBroadcastMethod
getListeners, registerProcessor, unregisterProcessor
-
Field Details
-
KIND_NODES
public static final int KIND_NODES- See Also:
-
-
Constructor Details
-
UnicastBroadcastMethod
public UnicastBroadcastMethod()
-
-
Method Details
-
getConfiguration
-
setConfiguration
-
getServerAddress
-
getSettings
Description copied from interface:BroadcastMethodProvides generic access to method specific settings- Specified by:
getSettingsin interfaceBroadcastMethod- Overrides:
getSettingsin classAbstractBroadcastMethod
-
init
Description copied from interface:BroadcastMethodCalled once when the messaging method has been registered- Specified by:
initin interfaceBroadcastMethod- Overrides:
initin classAbstractBroadcastMethod
-
getConfig
-
registerConfigChangeListener
protected void registerConfigChangeListener() -
removeConfigChangeListener
protected void removeConfigChangeListener() -
send
Sends the givenRawMessage. If this message exceed theUDPBroadcastMethodConfiguration.getPacketSize()the message will be splitted up.- Parameters:
message- the message to be send
-
isSyncNodesEnabled
public boolean isSyncNodesEnabled() -
getClusterNodes
-
isOwnAddress
-
shutdown
public void shutdown()Description copied from interface:BroadcastMethodCalled before system shutdown- Specified by:
shutdownin interfaceBroadcastMethod- Overrides:
shutdownin classAbstractBroadcastMethod
-
readConfig
protected void readConfig() -
resolveAddresses
protected Set<InetSocketAddress> resolveAddresses(Collection<InetSocketAddress> unresolvedAddresses) -
resolveAddress
-
start
protected void start() -
startServer
protected void startServer() -
startSocket
-
sendPacket
-
notifyMessgageReceived
- Overrides:
notifyMessgageReceivedin classAbstractBroadcastMethod
-
accept
-
processDatagramPacket
-