public class DefaultNetworkEvent extends DefaultEvent implements NetworkEvent
NetworkEvent
interface. This class wraps a
message that needs to be transmitted to a remote Machine or VM.Modifier and Type | Field and Description |
---|---|
private DeliveryGuaranty |
guaranty |
private static long |
serialVersionUID |
eventContext, source, timeStamp, type
Constructor and Description |
---|
DefaultNetworkEvent()
Default constructor which will set the
DeliveryGuaranty to
RELIABLE. |
DefaultNetworkEvent(Event event)
Copy constructor which will take values from the event and set it on this
instance.
|
DefaultNetworkEvent(Event event,
DeliveryGuaranty deliveryGuaranty)
Copy constructor which will take values from the event and set it on this
instance.
|
Modifier and Type | Method and Description |
---|---|
DeliveryGuaranty |
getDeliveryGuaranty() |
void |
setDeliveryGuaranty(DeliveryGuaranty deliveryGuaranty) |
void |
setType(int type) |
getEventContext, getSource, getTimeStamp, getType, setEventContext, setSource, setTimeStamp, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEventContext, getSource, getTimeStamp, getType, setEventContext, setSource, setTimeStamp
private DeliveryGuaranty guaranty
private static final long serialVersionUID
public DefaultNetworkEvent()
DeliveryGuaranty
to
RELIABLE. It will also set the type of the event to
Events.NETWORK_MESSAGE
.public DefaultNetworkEvent(Event event)
Events.NETWORK_MESSAGE
. DeliveryGuaranty.DeliveryGuarantyOptions
is set to
RELIABLE.event
- The instance from which payload, create time etc will be
copiedpublic DefaultNetworkEvent(Event event, DeliveryGuaranty deliveryGuaranty)
Events.NETWORK_MESSAGE
. DeliveryGuaranty.DeliveryGuarantyOptions
is set to the
value passed inevent
- The instance from which payload, create time etc will be
copieddeliveryGuaranty
- public DeliveryGuaranty getDeliveryGuaranty()
getDeliveryGuaranty
in interface NetworkEvent
public void setDeliveryGuaranty(DeliveryGuaranty deliveryGuaranty)
setDeliveryGuaranty
in interface NetworkEvent
public void setType(int type)
setType
in interface Event
setType
in class DefaultEvent
Copyright © 2013. All Rights Reserved.