fulmine.event.system
Class AbstractSystemEvent
java.lang.Object
fulmine.event.AbstractEvent
fulmine.event.system.AbstractSystemEvent
- All Implemented Interfaces:
- IEvent, ISystemEvent, IAddressable, IDescriptor, Cloneable
- Direct Known Subclasses:
- ChannelDestroyedEvent, ChannelReadyEvent, ConnectionAvailableEvent, ConnectionDestroyedEvent, ContainerCreatedEvent, ContainerDestroyedEvent, ContextDiscoveredEvent, ContextNotAvailableEvent, EventSourceNotObservedEvent, EventSourceObservedEvent, RemoteContainerCreatedEvent, RemoteContainerDestroyedEvent, RpcInvokeEvent, SendRpcEvent, SubscribeEvent, UnsubscribeEvent
public class AbstractSystemEvent
- extends AbstractEvent
- implements ISystemEvent
Base class for ISystemEvent
instances.
Note that it is not a good idea to have multiple levels of inheritance for
system events. All true system events should only extend this and
should not be further extended. This is to prevent logic bugs with any code
that does instanceof
checks on an event type. Events should not
extend each other unless there is a genuine semantic meaning for the
inheritance. The drawback is that events with similar internal constructs
have to be re-written each time.
- Author:
- Ramon Servadei
Methods inherited from class fulmine.event.AbstractEvent |
clone, equals, getAddress, getDomain, getDrivingFrame, getFrame, getIdentity, getSource, getTriggerEvent, getType, hashCode, setAddress, setDrivingFrame, setFrame, setSource, setTriggerEvent, toDetailedString, toIdentityString, toString |
AbstractSystemEvent
public AbstractSystemEvent(IEventManager context)
- Create a system event
- Parameters:
context
- the context for the ISystemEventSource
that generates
this event
AbstractSystemEvent
protected AbstractSystemEvent(IEventManager context,
IAddressable address)
- Create a system event with a specific address
- Parameters:
context
- the context for the ISystemEventSource
that generates
this eventaddress
- the IAddressable
for this event
getAdditionalToString
protected String getAdditionalToString()
- Description copied from class:
AbstractEvent
- Delegate method for subclasses to provide additional toString
information. This should be a comma separated string, e.g.
"one, two, three"
- Overrides:
getAdditionalToString
in class AbstractEvent
- Returns:
- the additional toString information in comma separated format
hideSourceFromToString
protected boolean hideSourceFromToString()
- Description copied from class:
AbstractEvent
- Allows sub-classes the ability to hide the source attribute from the
AbstractEvent.toString()
calls.
- Overrides:
hideSourceFromToString
in class AbstractEvent
- Returns:
true
if the source attribute should not be shown in
string representations. Default is false
.
Copyright © 2007-2009. All Rights Reserved.