- Direct Known Subclasses:
This class implements the
Manager interface. Contrary
to classes that only implement
classes therefore don't need a manager attribute to get access to the
component management methods provided by this interface.
This class also implements the Channel interface in such a way that each instance of this class can be used as an independent channel. Note that events that have a component as one of their channels are always handled by the component's handlers, i.e. in addition to the channels explicitly defined for a handler.
Nested Class Summary
Constructor SummaryConstructorDescriptionCreates a new component base with its channel set to itself.Creates a new component base with its channel set to the given channel.
Method SummaryModifier and TypeMethodDescription
channel()Returns the channel associated with the component.Returns the component represented by this node in the tree.Return the object itself as value.
booleanSets the (optional) name of the component.
Methods inherited from class org.jgrapes.core.internal.ComponentVertex
activeEventPipeline, addHandler, attach, children, componentPath, componentVertex, detach, fire, initComponentsHandlers, iterator, name, newEventPipeline, newEventPipeline, parent, registerAsGenerator, root, toString, unregisterAsGenerator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Componentpublic Component()Creates a new component base with its channel set to itself.
ComponentCreates a new component base with its channel set to the given channel.
As a special case
Channel.SELFcan be passed to the constructor to make the component use itself as channel. The special value is necessary as you obviously cannot pass an object to be constructed to its constructor.
componentChannel- the channel that the component’s handlers listen on by default and that
Manager.fire(Event, Channel...)sends the event to
(Channel componentChannel, HandlerDefinition.ChannelReplacements channelReplacements)Creates a new component base like
Component(Channel)but with channel mappings for
setNameDescription copied from interface:
ManagerSets the (optional) name of the component.
componentDescription copied from class:
ComponentVertexReturns the component represented by this node in the tree.
channelReturns the channel associated with the component.
defaultCriterionReturn the object itself as value.