java.lang.Object
java.util.EventObject
cl.netswitch.lib.client.MulticastEvent
- All Implemented Interfaces:
Serializable
MulticastEvent is used to notify that a multicast message has arrived.
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionMulticastEvent
(ClientChannel channel, Message message) Constructs a newMulticastEvent
instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns the client channel of this MulticastEvent.Returns the multicast message of this MulticastEvent.getName()
Returns the multicast name of this MulticastEvent.<T extends Serializable>
TReturns the object contained in the message of this MulticastEvent.Methods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
MulticastEvent
Constructs a newMulticastEvent
instance.- Parameters:
channel
- the object on which the event occurred.message
- the multicast message of this event.- Throws:
NullPointerException
- if an argument isnull
.
-
-
Method Details
-
getClientChannel
Returns the client channel of this MulticastEvent.- Returns:
- the client channel of this MulticastEvent.
-
getName
Returns the multicast name of this MulticastEvent.- Returns:
- the multicast name of this MulticastEvent.
-
getMessage
Returns the multicast message of this MulticastEvent.- Returns:
- the multicast message of this MulticastEvent.
-
getObject
Returns the object contained in the message of this MulticastEvent.Warning: to reduce memory consumption, this method returns a reference to (not a copy of) the mutable object stored in the request message. If the returned object is later modified, the request message object will be modified.
- Type Parameters:
T
- the type of the returned object.- Parameters:
type
- the class of the returned object.- Returns:
- a typed object or
null
if not defined. - Throws:
NullPointerException
- iftype
isnull
.ClassCastException
- if object is not an instance oftype
.
-