Uses of Annotation Interface
org.jgrapes.core.annotation.Handler
Packages that use Handler
Package
Description
Provides components for building a HTTP server based on the
core and IO components.
I/O related components built on top of the core package.
Classes for managing processes.
Utility classes, mainly for adapted buffers to specific needs.
Components for handling mail.
Networking related I/O classes.
Utility components that are too small to deserve
individual libraries/projects.
-
Uses of Handler in org.jgrapes.http
Methods in org.jgrapes.http with annotations of type HandlerModifier and TypeMethodDescriptionvoidHttpServer.onAccepted(Accepted event, IOSubchannel netChannel) Creates a new downstream connection asLinkedIOSubchannelof the network connection, aHttpRequestDecoderand aHttpResponseEncoder.voidHandles a close event from the application channel.voidHandles a close event from downstream by closing the upstream connections.voidHttpConnector.onClosed(Closed<?> event, SocketIOChannel netConnChannel) Called when the network connection is closed.voidHttpServer.onClosed(Closed<?> event, IOSubchannel netChannel) Forwards aClosedevent to the application channel.voidHttpConnector.onConnected(ClientConnected event, SocketIOChannel netConnChannel) Called when the network connection is established.voidSessionManager.onDiscard(DiscardSession event) Discards the given session.voidHttpConnector.onInput(Input<ByteBuffer> event, SocketIOChannel netConnChannel) Processes any input from the network layer.voidHttpServer.onInput(Input<ByteBuffer> event, IOSubchannel netChannel) Handles data from the client (from upstream).voidHandles I/O error events from the network layer.voidHttpServer.onOptions(Request.In.Options event, IOSubchannel appChannel) Provides a fallback handler for an OPTIONS request with asterisk.voidHandles output from the application.voidReceives the message body of a response.voidHttpServer.onProtocolSwitchAccepted(ProtocolSwitchAccepted event, org.jgrapes.http.HttpServer.WebAppMsgChannel appChannel) voidLanguageSelector.onProtocolSwitchAccepted(ProtocolSwitchAccepted event, IOSubchannel channel) Handles a procotol switch by associating the language selection with the channel.voidSessionManager.onProtocolSwitchAccepted(ProtocolSwitchAccepted event, IOSubchannel channel) Associates the channel with afor the session.Supplier<Optional<Session>>voidHttpServer.onPurge(Purge event, IOSubchannel netChannel) Forwards aPurgeevent to the application channel.voidHttpConnector.onRequest(Request.Out event) Starts the processing of a request from the application layer.voidHttpServer.onRequestCompleted(Request.In.Completed event, IOSubchannel appChannel) Checks whether the request has been handled (value ofRequestevent set totrue) or the status code in the prepared response is no longer “Not Implemented”.voidHttpServer.onResponse(Response event, org.jgrapes.http.HttpServer.WebAppMsgChannel appChannel) Handles a response event from downstream by sending it through anHttpResponseEncoderthat generates the data (encoded information) and sends it upstream withOutputevents. -
Uses of Handler in org.jgrapes.io
Methods in org.jgrapes.io with annotations of type HandlerModifier and TypeMethodDescriptionvoidHandle close by closing the file associated with the channel.voidInputStreamMonitor.onConfigurationUpdate(ConfigurationUpdate event) The component can be configured with events that include a path (see @linkConfigurationUpdate.paths()) that matches this components path (seeManager.componentPath()).voidFileStorage.onInput(Input<ByteBuffer> event, Channel channel) Handle input by writing it to the file, if a channel exists.voidNioDispatcher.onNioRegistration(NioRegistration event) Handle the NIO registration.voidFileStorage.onOutput(Output<ByteBuffer> event, Channel channel) HandleOutputevents by writing them to the file, if a channel exists.voidPurgeTerminator.onPurge(Purge event, IOSubchannel channel) voidFileStorage.onSaveInput(SaveInput event) Opens a file for writing using the properties of the event.voidFileStorage.onSaveOutput(SaveOutput event) Opens a file for writing using the properties of the event.voidStarts a thread that continuously reads available data from the input stream.voidStarts this dispatcher.voidHandle stop by closing all files.voidStops the thread that reads data from the input stream.voidStops the thread that is associated with this dispatcher.voidFileStorage.onStreamFile(StreamFile event) Opens a file for reading using the properties of the event and streams its content as a sequence ofOutputevents with the end of record flag set in the last event. -
Uses of Handler in org.jgrapes.io.process
Methods in org.jgrapes.io.process with annotations of type HandlerModifier and TypeMethodDescriptionvoidCloses the output to the process (the process’s stdin).voidHandles closed events from stdout and stderr.voidProcessManager.onOutput(Output<ByteBuffer> event, ProcessManager.ProcessChannel channel) Writes the data passed in the event.voidProcessManager.onStartProcess(StartProcess event) Start a new process using the data from the event.voidStop all running processes. -
Uses of Handler in org.jgrapes.io.util
Methods in org.jgrapes.io.util with annotations of type Handler -
Uses of Handler in org.jgrapes.mail
Methods in org.jgrapes.mail with annotations of type HandlerModifier and TypeMethodDescriptionvoidMailConnectionManager.onConfigUpdate(ConfigurationUpdate event) Configure the component.voidMailSender.onMessage(SendMailMessage event, Channel channel) Sends the message as specified by the event.voidMailMonitor.onOpenMailMonitor(OpenMailMonitor event, Channel channel) Open a store as specified by the event and monitor the folders (also specified by the event).voidMailSender.onOpenMailSender(OpenMailSender event, Channel channel) Open a connection for sending mail as specified by the event.voidStart the component.voidMailMonitor.onUpdateFolders(UpdateMailFolders event, MailChannel channel) Retrieves the folders specified in the event. -
Uses of Handler in org.jgrapes.net
Methods in org.jgrapes.net with annotations of type HandlerModifier and TypeMethodDescriptionvoidSslCodec.onAccepted(Accepted event, IOSubchannel encryptedChannel) Creates a new downstream connection asLinkedIOSubchannelof the network connection together with anSSLEngine.voidShuts down the one of the connections.voidShuts down the server or one of the connections to the server.voidForwards a close event upstream.voidSslCodec.onClosed(Closed<Void> event, IOSubchannel encryptedChannel) Handles a close event from the encrypted channel (client).voidSocketServer.onConfigurationUpdate(ConfigurationUpdate event) The component can be configured with events that include a path (see @linkConfigurationUpdate.paths()) that matches this components path (seeManager.componentPath()).voidSslCodec.onConnected(ClientConnected event, IOSubchannel encryptedChannel) Creates a new downstream connection asLinkedIOSubchannelof the network connection together with anSSLEngine.voidSslCodec.onHalfClosed(HalfClosed event, IOSubchannel encryptedChannel) Handles a half close event from the encrypted channel (client).voidSslCodec.onInput(Input<ByteBuffer> event, IOSubchannel encryptedChannel) Handles encrypted data from upstream (the network).voidHandles anIOErrorevent from the encrypted channel (client) by sending it downstream.voidSocketConnector.onOpenConnection(OpenSocketConnection event) Opens a connection to the end point specified in the event.voidSslCodec.onOpenConnection(OpenSocketConnection event) Forward the connection request to the encrypted network.voidSocketConnectionManager.onOutput(Output<ByteBuffer> event, SocketConnectionManager.SocketChannelImpl channel) Writes the data passed in the event.voidSslCodec.onOutput(Output<ByteBuffer> event, org.jgrapes.net.SslCodec.PlainChannel plainChannel) Sends plain data through the engine and then upstream.voidSslCodec.onPurge(Purge event, IOSubchannel encryptedChannel) Forwards aPurgeevent downstream.voidSocketConnector.onRegistered(NioRegistration.Completed event) Called when the new socket channel has successfully been registered with the nio dispatcher.voidSocketServer.onRegistered(NioRegistration.Completed event) Handles the successful channel registration.voidStarts the server.voidShuts down the server by firing aCloseusing the server as channel. -
Uses of Handler in org.jgrapes.util
Methods in org.jgrapes.util with annotations of type HandlerModifier and TypeMethodDescriptionvoidComponentProvider.onConfigurationUpdate(ConfigurationUpdate evt) Uses the information from the event to configure the provided components.voidNightConfigStore.onConfigurationUpdate(ConfigurationUpdate event) Merges and saves configuration updates.voidPreferencesStore.onConfigurationUpdate(ConfigurationUpdate event) Merges and saves configuration updates.voidNightConfigStore.onFileChanged(FileChanged event) If watching the configuration file is enabled, fire aConfigurationUpdateevent with the complete configuration when the file changes.voidIntercepts theStartevent and fires aConfigurationUpdateevent.voidIntercepts theStartevent and fires aConfigurationUpdateevent.voidFileSystemWatcher.onWatchFile(WatchFile event, Channel channel) Register a path to wath.