Uses of Interface
org.jgrapes.core.Channel
Package
Description
Defines the interfaces and classes that provide
the core functionality of the JGrapes event driven component framework.
Annotations used by the library.
Core events.
Classes implementing the public API of the library.
Provides components for building a HTTP server based on the
core and IO components.
Adds a special annotation for methods that handle
HTTP request events.
Provides the events handled by the server components.
Provides a base component for generating template based responses
to HTTP requests.
I/O related components built on top of the core package.
Provides the events used by the I/O related components.
Classes for managing processes.
Utility classes, mainly for adapted buffers to specific needs.
Components for handling mail.
Mail related events.
Networking related I/O classes.
Utility components that are too small to deserve
individual libraries/projects.
-
Uses of Channel in org.jgrapes.core
Modifier and TypeInterfaceDescriptionstatic interface
This interface’s class can be used to specify the component’s channel (seeComponent.channel()
) as criterion in handler annotations.interface
This interface type can be used to specify the object itself as channel in handler annotations.interface
Represents a subchannel.Modifier and TypeClassDescriptionclass
This class is the root base class for channels that use their class (type) as value for matching (seeEligible
).class
This class can be used as base class for implementing a component.class
ComponentCollector<F extends ComponentFactory>
Deprecated.final class
This class provides channels that are identified by a name (string
).static class
A simple implementation ofSubchannel
.Modifier and TypeFieldDescriptionstatic final Channel
Channel.BROADCAST
A special channel instance that can be used to send events to all components.static final Channel
Channel.SELF
A special channel object that can be passed as argument to the constructor ofComponent(Channel)
.Modifier and TypeMethodDescriptionEvent.forChannels
(Class<C> type, BiConsumer<E, C> handler) Execute the given handler for all channels of the given type.Modifier and TypeMethodDescriptionComponent.channel()
Returns the channel associated with the component.Manager.channel()
Returns the channel of the component managed by this manager.Channel[]
Event.channels()
Returns the channels associated with the event.Subchannel.DefaultSubchannel.mainChannel()
Subchannel.mainChannel()
Returns the main channel.Modifier and TypeMethodDescriptiondefault ComponentType
Creates a new component with its channel set to the given channel.Creates a new component with its channel set to the given channel using the given additional properties.<T extends Event<?>>
TAdd an event to be sent to components listening for such events on the given channels to the end of the queue.<T> Event
<T> Fires the given event on the given channel.static Manager
Components.manager
(ComponentType component, Channel componentChannel) Returns a component’s manager likeComponents.manager(ComponentType)
.Event.setChannels
(Channel... channels) Sets the channels that the event is fired on if no channels are specified explicitly when firing the event (seeManager.fire(Event, Channel...)
).static String
Returns a textual representation of a channel.static String
Returns a textual representation of an array of channels.ModifierConstructorDescriptionCompletionEvent
(T monitoredEvent, Channel... channels) Instantiates a new completion event.Creates a new component base with its channel set to the given channel.Component
(Channel componentChannel, HandlerDefinition.ChannelReplacements channelReplacements) Creates a new component base likeComponent(Channel)
but with channel mappings forHandler
annotations.ComponentCollector
(Class<F> factoryClass, Channel componentChannel) Deprecated.Utility constructor that uses each factory to create a single instance, using an empty map as properties.ComponentCollector
(Class<F> factoryClass, Channel componentChannel, Function<String, List<Map<Object, Object>>> matcher) Deprecated.Creates a new collector that collects the factories of the given type and uses each to create one or more instances with this component’s (the component collector’s) channel.DefaultSubchannel
(Channel mainChannel) Creates a new instance with the given main channel and response pipeline.Creates a new event. -
Uses of Channel in org.jgrapes.core.annotation
Modifier and TypeClassDescriptionstatic final class
The default value for thechannels
parameter of the annotation.Modifier and TypeMethodDescriptionHandlerDefinition.ChannelReplacements.add
(Class<? extends Channel> annotationCriterion, Channel... replacements) Adds a replacements to the replacements. -
Uses of Channel in org.jgrapes.core.events
-
Uses of Channel in org.jgrapes.core.internal
Modifier and TypeClassDescriptionfinal class
The ComponentProxy is a special ComponentVertex that references the object implementing the Component interface (instead of being its base class).class
ComponentVertex is the base class for all nodes in the component tree.Modifier and TypeFieldDescriptionChannel[]
EventChannelsTuple.channels
protected Channel
EventBase.invokedFor
Temporarily set when invoking a handler, only to be used byEventBase.handlingError(EventPipeline, Throwable)
.Modifier and TypeMethodDescriptionComponentProxy.channel()
abstract Channel[]
EventBase.channels()
SeeEvent.channels()
.Modifier and TypeMethodDescription<T extends Event<?>>
T<T extends Event<?>>
Tstatic void
EventChannelsTuple.addTo
(Queue<EventChannelsTuple> queue, EventBase<?> event, Channel... channels) Adds a newly createdEventChannelsTuple
to the given queue.static ComponentVertex
ComponentVertex.componentVertex
(ComponentType component, Channel componentChannel) Return the component node for a given component.<T> Event
<T> ModifierConstructorDescriptionEventChannelsTuple
(EventBase<?> event, Channel[] channels) Create a new instance. -
Uses of Channel in org.jgrapes.http
Modifier and TypeClassDescriptionclass
A converter component that receives and sends web application layer messages and byte buffers on associated network channels.class
A converter component that receives and sends byte buffers on a network channel and web application layer messages onIOSubchannel
s of its channel.class
A in memory session manager.class
A component that attempts to derive information about language preferences from requests in the specified scope (usually “/”) and make them available as aLanguageSelector.Selection
object associated with the request event usingSelection.class
as association identifier.class
A base class for session managers.class
A dispatcher for requests for static content, usually files.ModifierConstructorDescriptionHttpConnector
(Channel appChannel, Channel networkChannel) Create a new connector that uses the networkChannel for network level I/O.HttpConnector
(Channel appChannel, Channel networkChannel, Channel secureChannel) Create a new connector that uses the networkChannel for network level I/O.HttpServer
(Channel appChannel, InetSocketAddress serverAddress, Class<? extends Request.In>... fallbacks) Create a new server that creates its ownSocketServer
with the given address and uses it for network level I/O.HttpServer
(Channel appChannel, Channel networkChannel, Class<? extends Request.In>... fallbacks) Create a new server that uses the networkChannel for network level I/O.InMemorySessionManager
(Channel componentChannel) Creates a new session manager with its channel set to the given channel, the path to “/” and the handler’s priority to 1000.InMemorySessionManager
(Channel componentChannel, String path) Creates a new session manager with the given channel and path.InMemorySessionManager
(Channel componentChannel, String pattern, int priority, String path) Creates a new session manager using the given channel and path.LanguageSelector
(Channel componentChannel) Creates a new language selector component with its channel set to the given channel and the scope to “/”.LanguageSelector
(Channel componentChannel, String scope) Creates a new language selector component with its channel set to the given channel and the scope to the given scope.LanguageSelector
(Channel componentChannel, String scope, int priority) Creates a new language selector component with its channel set to the given channel and the scope to the given scope.SessionManager
(Channel componentChannel) Creates a new session manager with its channel set to the given channel and the path to “/”.SessionManager
(Channel componentChannel, String path) Creates a new session manager with the given channel and path.SessionManager
(Channel componentChannel, String pattern, int priority, String path) Creates a new session manager using the given channel and path.StaticContentDispatcher
(Channel componentChannel, String resourcePattern, URI contentRoot) Creates new dispatcher that tries to fulfill requests matching the given resource pattern from the given content root. -
Uses of Channel in org.jgrapes.http.annotation
ModifierConstructorDescriptionScope
(ComponentType component, Method method, RequestHandler annotation, Map<Class<? extends Channel>, Object[]> channelReplacements, String pattern) Instantiates a new scope. -
Uses of Channel in org.jgrapes.http.events
ModifierConstructorDescriptionCompleted
(Request.In monitoredEvent, Channel... channels) Instantiates a new event.Connect
(HttpRequest request, boolean secure, int matchLevels, Channel... channels) Create a new event.Delete
(HttpRequest request, boolean secure, int matchLevels, Channel... channels) Create a new event.DiscardSession
(Session session, Channel... channels) Creates a new event.Get
(HttpRequest request, boolean secure, int matchLevels, Channel... channels) Create a new event.Head
(HttpRequest request, boolean secure, int matchLevels, Channel... channels) Create a new event.In
(String protocol, HttpRequest request, int matchLevels, Channel... channels) Creates a new request event with the associatedRequest.In.Completed
event.MessageReceived
(Channel... channels) Instantiates a new message.Options
(HttpRequest request, boolean secure, int matchLevels, Channel... channels) Create a new event.Post
(HttpRequest request, boolean secure, int matchLevels, Channel... channels) Create a new event.Put
(HttpRequest request, boolean secure, int matchLevels, Channel... channels) Create a new event.protected
Trace
(HttpRequest request, boolean secure, int matchLevels, Channel... channels) Create a new event.WebSocketClose
(WsCloseFrame closeFrame, Channel... channels) -
Uses of Channel in org.jgrapes.http.freemarker
Modifier and TypeClassDescriptionclass
A base class for components that generate responses to HTTP requests which are based on a FreeMarker template.ModifierConstructorDescriptionFreeMarkerRequestHandler
(Channel componentChannel, ClassLoader contentLoader, String contentPath, URI prefix) Instantiates a new free marker request handler.FreeMarkerRequestHandler
(Channel componentChannel, HandlerDefinition.ChannelReplacements channelReplacements, ClassLoader contentLoader, String contentPath, URI prefix) Instantiates a new free marker request handler. -
Uses of Channel in org.jgrapes.io
Modifier and TypeInterfaceDescriptioninterface
Represents a subchannel for grouping input and output events related to an I/O resource such as an opened file or a network connection.Modifier and TypeClassDescriptionclass
A component that reads from or writes to a file.class
A component that watches for new input on anInputStream
.static class
A simple implementation ofIOSubchannel
.class
A helper component that provides the central hub for non blocking I/O components.class
Modifier and TypeMethodDescriptionvoid
Handle close by closing the file associated with the channel.void
FileStorage.onInput
(Input<ByteBuffer> event, Channel channel) Handle input by writing it to the file, if a channel exists.void
FileStorage.onOutput
(Output<ByteBuffer> event, Channel channel) HandleOutput
events by writing them to the file, if a channel exists.ModifierConstructorDescriptionDefaultIOSubchannel
(Channel mainChannel, EventPipeline responsePipeline) Creates a new instance with the given main channel and response pipeline.FileStorage
(Channel channel) Create a new instance using the default buffer size of 8192.FileStorage
(Channel channel, int bufferSize) Create a new instance using the given size for the read buffers.InputStreamMonitor
(Channel componentChannel, InputStream input) Creates a new input stream monitor with its channel set to the given channel.InputStreamMonitor
(Channel componentChannel, InputStream input, Channel dataChannel) Creates a new input stream monitor with its channel set to the given channel.PurgeTerminator
(Channel componentChannel) -
Uses of Channel in org.jgrapes.io.events
ModifierConstructorDescriptionCompleted
(NioRegistration monitoredEvent, Channel... channels) Instantiates a new event.NioRegistration
(NioHandler handler, SelectableChannel ioChannel, int ops, Channel completedTarget) Creates a new registration event for the given handler, using the given NIO channel and handling the given operations. -
Uses of Channel in org.jgrapes.io.process
Modifier and TypeClassDescriptionclass
Provides a component that executes processes.final class
The Class ProcessChannel.ModifierConstructorDescriptionProcessManager
(Channel componentChannel) Create a new instance using the given channel. -
Uses of Channel in org.jgrapes.io.util
Modifier and TypeClassDescriptionclass
ConnectionManager<C extends ConnectionManager<C>.Connection>
A base class for components that manageSubchannel
s representing some kind of connection to a server or service.class
The base class for the connections managed by this component.class
Provides an I/O subchannel that is linked to another I/O subchannel.Modifier and TypeMethodDescriptionstatic String
LinkedIOSubchannel.upstreamToString
(Channel upstream) TheLinkedIOSubchannel.toString()
method ofLinkedIOSubchannel
s shows the channel together with the upstream channel that it is linked to.ModifierConstructorDescriptionConnection
(Channel mainChannel) ConnectionManager
(Channel componentChannel) Creates a new component base likeComponent(Channel)
but with channel mappings forHandler
annotations.ConnectionManager
(Channel componentChannel, HandlerDefinition.ChannelReplacements channelReplacements) Creates a new component base with its channel set to the given channel.JsonReader
(com.fasterxml.jackson.databind.ObjectMapper mapper, Class<R> resultType, EventPipeline pipeline, Channel channel) Instantiates a new JSON reader.JsonReader
(Class<R> resultType, EventPipeline pipeline, Channel channel) Instantiates a new JSON reader that uses a default object mapper.LinkedIOSubchannel
(Manager hub, Channel mainChannel, IOSubchannel upstreamChannel, EventPipeline responsePipeline) Creates a new LinkedIOSubchannel for a given main channel that links to the give I/O subchannel.LinkedIOSubchannel
(Manager hub, Channel mainChannel, IOSubchannel upstreamChannel, EventPipeline responsePipeline, boolean linkBack) Creates a new LinkedIOSubchannel for a given main channel that links to a given I/O subchannel. -
Uses of Channel in org.jgrapes.mail
Modifier and TypeInterfaceDescriptioninterface
A special sub channel used for sending and receiving mail.Modifier and TypeClassDescriptionclass
MailConnectionManager<C extends MailConnectionManager<C,
O>.AbstractMailChannel, O extends Event<?>> Provides a base class for mail components using connections.protected class
A sub-channel for mail connections.class
A component that opens mail stores and monitors mail folders for mails.protected class
The specific implementation of theMailChannel
.class
A component that sends mail using a system wide or user specific connection.protected class
The specific implementation of theMailChannel
.Modifier and TypeMethodDescriptionvoid
MailSender.onMessage
(SendMailMessage event, Channel channel) Sends the message as specified by the event.void
MailMonitor.onOpenMailMonitor
(OpenMailMonitor event, Channel channel) Open a store as specified by the event and monitor the folders (also specified by the event).void
MailSender.onOpenMailSender
(OpenMailSender event, Channel channel) Open a connection for sending mail as specified by the event.ModifierConstructorDescriptionAbstractMailChannel
(O event, Channel channel) Instantiates a new mail channel instance.MailConnectionManager
(Channel componentChannel) Creates a new server using the given channel.MailMonitor
(Channel componentChannel) Creates a new server using the given channel.MailSender
(Channel componentChannel) Creates a new component base with its channel set to the given channel.MonitorChannel
(OpenMailMonitor event, Channel mainChannel, Store store, String user, Password password) Instantiates a new monitor channel.SenderChannel
(Event<?> event, Channel mainChannel, Properties sessionProps, Optional<Password> password) Instantiates a new monitor channel. -
Uses of Channel in org.jgrapes.mail.events
-
Uses of Channel in org.jgrapes.net
Modifier and TypeInterfaceDescriptioninterface
A special sub channel used for socket connections.Modifier and TypeClassDescriptionclass
Provides a base class for theSocketServer
and theSocketConnector
.protected class
class
A component that reads from or write to a socket connection.class
Provides a socket server.class
A component that receives and sends byte buffers on an encrypted channel and sends and receives the corresponding decrypted data on a plain channel.ModifierConstructorDescriptionSocketConnectionManager
(Channel componentChannel) Creates a new server using the given channel.SocketConnector
(Channel channel) Create a new instance using the given channel.SocketServer
(Channel componentChannel) Creates a new server using the given channel.Creates a new codec to be used as client.SslCodec
(Channel plainChannel, Channel encryptedChannel, SSLContext sslContext) Creates a new codec that uses the givenSSLContext
. -
Uses of Channel in org.jgrapes.util
Modifier and TypeClassDescriptionclass
ComponentCollector<F extends ComponentFactory>
A component that collects all component factory services of a given type and uses each to create one or more components that are then attached to the component collector instance.class
Provides child components dynamically usingComponentFactory
s.class
A base class for configuration stores.class
A component that watches paths in the file system for changes and sends events if such changes occur.class
This component provides a store for an application’s configuration backed by a JSON file.class
A base class for configuration stored based on the night config library.class
This component provides a store for an application’s configuration backed by the JavaPreferences
.class
This component provides a store for an application’s configuration backed by a TOML file.class
This component provides a store for an application’s configuration backed by a YAML file.Modifier and TypeMethodDescriptionvoid
FileSystemWatcher.onWatchFile
(WatchFile event, Channel channel) Register a path to wath.ModifierConstructorDescriptionComponentCollector
(Class<F> factoryClass, Channel componentChannel) Utility constructor that uses each factory to create a single instance, using an empty map as properties.ComponentCollector
(Class<F> factoryClass, Channel componentChannel, Function<String, List<Map<Object, Object>>> configurator) Creates a new collector that collects the factories of the given type and uses each to create one or more instances with this component’s (the component collector’s) channel.ComponentProvider
(Channel componentChannel) Creates a new component with its channel set to the given channel.ConfigurationStore
(Channel componentChannel) Creates a new component base with its channel set to the given channel.ConfigurationStore
(Channel componentChannel, HandlerDefinition.ChannelReplacements channelReplacements) Creates a new component base likeConfigurationStore(Channel)
but with channel mappings forHandler
annotations.FileSystemWatcher
(Channel componentChannel) Creates a new component base with its channel set to the given channel.JsonConfigurationStore
(Channel componentChannel, File file) Creates a new component with its channel set to the given channel and the given file.JsonConfigurationStore
(Channel componentChannel, File file, boolean update) Creates a new component with its channel set to the given channel and the given file.JsonConfigurationStore
(Channel componentChannel, File file, boolean update, boolean watch) Creates a new component with its channel set to the given channel and the given file.NightConfigStore
(Channel componentChannel, File file) Deprecated.NightConfigStore
(Channel componentChannel, File file, boolean update) Deprecated.NightConfigStore
(Channel componentChannel, File file, boolean update, boolean watch) Creates a new component with its channel set to the given channel and the given file.PreferencesStore
(Channel componentChannel, Class<?> appClass) Creates a new component with its channel set to the given channel and a base path derived from the given class.PreferencesStore
(Channel componentChannel, Class<?> appClass, boolean update) Allows the creation of a “read-only” store.TomlConfigurationStore
(Channel componentChannel, File file) Creates a new component with its channel set to the given channel and the given file.TomlConfigurationStore
(Channel componentChannel, File file, boolean update) Creates a new component with its channel set to the given channel and the given file.TomlConfigurationStore
(Channel componentChannel, File file, boolean update, boolean watch) Creates a new component with its channel set to the given channel and the given file.YamlConfigurationStore
(Channel componentChannel, File file) Creates a new component with its channel set to the given channel and the given file.YamlConfigurationStore
(Channel componentChannel, File file, boolean update) Creates a new component with its channel set to the given channel and the given file.YamlConfigurationStore
(Channel componentChannel, File file, boolean update, boolean watch) Creates a new component with its channel set to the given channel and the given file. -
Uses of Channel in org.jgrapes.util.events
ModifierConstructorDescriptionKeyValueStoreData
(KeyValueStoreQuery monitoredEvent, Channel... channels) KeyValueStoreQuery
(String key, Channel channel) Convenience constructor for creating a new event with a completion event of typeKeyValueStoreData
that is fired on the given channel.
ComponentCollector
.