Package org.jgrapes.core
Interface Subchannel
- All Superinterfaces:
Associator
,Channel
,Eligible
- All Known Subinterfaces:
IOSubchannel
,MailChannel
,SocketIOChannel
- All Known Implementing Classes:
ConnectionManager.Connection
,IOSubchannel.DefaultIOSubchannel
,LinkedIOSubchannel
,MailConnectionManager.AbstractMailChannel
,MailMonitor.MonitorChannel
,MailSender.SenderChannel
,ProcessManager.ProcessChannel
,SocketConnectionManager.SocketChannelImpl
,Subchannel.DefaultSubchannel
Represents a subchannel.
Subchannels delegate the invocations of a
Channel
’s methods to their respective main channel. Events fired on
a subchannel are therefore handled by the framework as if they were fired on
the main channel. Firing events on a subchannel instance instead of on the
main channel is a means to associate several events with a common context.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jgrapes.core.Channel
Channel.Default
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Subchannel
Creates a new subchannel of the given component’s channel.default Object
Returns the main channel’s match value.default boolean
isEligibleFor
(Object value) Delegates to main channel.Returns the main channel.static String
toString
(Subchannel subchannel) Returns a string representation of the channel.Methods inherited from interface org.jgrapes.core.Associator
associated, associated, associated, associated, associatedGet, setAssociated
-
Method Details
-
mainChannel
Returns the main channel.- Returns:
- the mainChannel
-
defaultCriterion
Returns the main channel’s match value.- Specified by:
defaultCriterion
in interfaceEligible
- Returns:
- the criterion
- See Also:
-
isEligibleFor
Delegates to main channel.- Specified by:
isEligibleFor
in interfaceChannel
- Specified by:
isEligibleFor
in interfaceEligible
- Parameters:
value
- the criterion- Returns:
- true, if is eligible for
- See Also:
-
toString
Returns a string representation of the channel.- Parameters:
subchannel
- the subchannel- Returns:
- the string
-
create
Creates a new subchannel of the given component’s channel.- Parameters:
component
- the component used to get the main channel- Returns:
- the subchannel
-