Uses of Interface
org.jgrapes.io.IOSubchannel
Packages that use IOSubchannel
Package
Description
Provides components for building a HTTP server based on the
core and IO components.
Provides a base component for generating template based responses
to HTTP requests.
I/O related components built on top of the core package.
Classes for managing processes.
Utility classes, mainly for adapted buffers to specific needs.
Networking related I/O classes.
-
Uses of IOSubchannel in org.jgrapes.http
Methods in org.jgrapes.http with parameters of type IOSubchannelModifier and TypeMethodDescriptionvoidHttpServer.onAccepted(Accepted event, IOSubchannel netChannel) Creates a new downstream connection asLinkedIOSubchannelof the network connection, aHttpRequestDecoderand aHttpResponseEncoder.voidHttpServer.onClosed(Closed<?> event, IOSubchannel netChannel) Forwards aClosedevent to the application channel.voidStaticContentDispatcher.onGet(Request.In.Get event, IOSubchannel channel) Handles aGETrequest.voidHttpServer.onInput(Input<ByteBuffer> event, IOSubchannel netChannel) Handles data from the client (from upstream).voidHttpServer.onOptions(Request.In.Options event, IOSubchannel appChannel) Provides a fallback handler for an OPTIONS request with asterisk.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.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”.static voidResponseCreationSupport.sendResponse(HttpRequest request, IOSubchannel channel, int statusCode, String reasonPhrase) Send a response to the given request with the given status code and reason phrase, including atext/plainbody with the status code and reason phrase.static voidResponseCreationSupport.sendResponse(HttpRequest request, IOSubchannel channel, HttpConstants.HttpStatus status) Shorthand for invokingResponseCreationSupport.sendResponse(HttpRequest, IOSubchannel, int, String)with a predefined HTTP status.static booleanResponseCreationSupport.sendStaticContent(HttpRequest request, IOSubchannel channel, Function<String, URL> resolver, ResponseCreationSupport.MaxAgeCalculator maxAgeCalculator) Creates and sends a response with static content.static booleanResponseCreationSupport.sendStaticContent(Request.In event, IOSubchannel channel, Function<String, URL> resolver, ResponseCreationSupport.MaxAgeCalculator maxAgeCalculator) Shorthand for invokingResponseCreationSupport.sendStaticContent(HttpRequest, IOSubchannel, Function, MaxAgeCalculator)with theHttpRequestfrom the event. -
Uses of IOSubchannel in org.jgrapes.http.freemarker
Methods in org.jgrapes.http.freemarker with parameters of type IOSubchannelModifier and TypeMethodDescriptionprotected voidFreeMarkerRequestHandler.doRespond(Request.In event, IOSubchannel channel) Removes the prefix specified in the constructor from the path in the request.protected booleanFreeMarkerRequestHandler.sendProcessedTemplate(Request.In event, IOSubchannel channel, freemarker.template.Template tpl) Render a response using the given template.protected booleanFreeMarkerRequestHandler.sendProcessedTemplate(Request.In event, IOSubchannel channel, String path) Render a response using the template obtained from the config withConfiguration.getTemplate(String)and the given path. -
Uses of IOSubchannel in org.jgrapes.io
Classes in org.jgrapes.io that implement IOSubchannelMethods in org.jgrapes.io that return IOSubchannelModifier and TypeMethodDescriptionstatic IOSubchannelIOSubchannel.create(Component component, EventPipeline responsePipeline) Creates a new subchannel of the given component’s channel with the given event pipeline and a buffer pool with two buffers sized 4096.Methods in org.jgrapes.io with parameters of type IOSubchannelModifier and TypeMethodDescriptionvoidPurgeTerminator.onPurge(Purge event, IOSubchannel channel) -
Uses of IOSubchannel in org.jgrapes.io.process
Classes in org.jgrapes.io.process that implement IOSubchannelModifier and TypeClassDescriptionfinal classThe Class ProcessChannel. -
Uses of IOSubchannel in org.jgrapes.io.util
Classes in org.jgrapes.io.util that implement IOSubchannelModifier and TypeClassDescriptionclassProvides an I/O subchannel that is linked to another I/O subchannel.Fields in org.jgrapes.io.util declared as IOSubchannelMethods in org.jgrapes.io.util that return IOSubchannelModifier and TypeMethodDescriptionLinkedIOSubchannel.upstreamChannel()Returns the upstream channel.Methods in org.jgrapes.io.util with parameters of type IOSubchannelModifier and TypeMethodDescriptionstatic Optional<? extends LinkedIOSubchannel> LinkedIOSubchannel.downstreamChannel(Manager hub, IOSubchannel upstreamChannel) Returns the linked downstream channel that has been created for the given component and (upstream) subchannel.static <T extends LinkedIOSubchannel>
Optional<T> LinkedIOSubchannel.downstreamChannel(Manager hub, IOSubchannel upstreamChannel, Class<T> clazz) LikeLinkedIOSubchannel.downstreamChannel(Manager, IOSubchannel), but with the return value of the specified type.voidOutputSupplier.emit(IOSubchannel channel) Emit theOutputevents.Constructors in org.jgrapes.io.util with parameters of type IOSubchannelModifierConstructorDescriptionAbstractBufferWriter(IOSubchannel channel) Creates a new instance that usesOutputevents to dispatch buffers on the given channel, using the channel’s response pipeline.AbstractBufferWriter(IOSubchannel channel, EventPipeline eventPipeline) Creates a new instance that usesOutputevents to dispatch buffers on the given channel, using the given event pipeline.BufferedReaderPipeline(BufferedReader in, IOSubchannel channel) Creates a new pipeline that sends the lines from the given reader as events on the given channel, using the channel’s response pipeline.BufferedReaderPipeline(BufferedReader in, IOSubchannel channel, EventPipeline eventPipeline) Creates a new pipeline that sends the lines from the given reader as events on the given channel, using the given event pipeline.ByteBufferOutputStream(IOSubchannel channel) Creates a new instance that usesOutputevents to dispatch buffers on the given channel, using the channel’s response pipeline.ByteBufferOutputStream(IOSubchannel channel, EventPipeline eventPipeline) Creates a new instance that usesOutputevents to dispatch buffers on the given channel, using the given event pipeline.ByteBufferWriter(IOSubchannel channel) Creates a new instance that usesOutputevents to dispatch buffers on the given channel, using the channel’s response pipeline.ByteBufferWriter(IOSubchannel channel, EventPipeline eventPipeline) Creates a new instance that usesOutputevents to dispatch buffers on the given channel, using the given event pipeline.CharBufferWriter(IOSubchannel channel) Creates a new instance that usesOutputevents to dispatch buffers on the given channel, using the channel’s response pipeline.CharBufferWriter(IOSubchannel channel, EventPipeline eventPipeline) Creates a new instance that usesOutputevents to dispatch buffers on the given channel, using the given event pipeline.InputStreamPipeline(InputStream in, IOSubchannel channel) Creates a new pipeline that sends the data from the given input stream as events on the given channel, using the channel’s response pipeline.InputStreamPipeline(InputStream in, IOSubchannel channel, EventPipeline eventPipeline) Creates a new pipeline that sends the data from the given input stream as events on the given channel, using the given event pipeline.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 IOSubchannel in org.jgrapes.net
Subinterfaces of IOSubchannel in org.jgrapes.netModifier and TypeInterfaceDescriptioninterfaceA special sub channel used for socket connections.Classes in org.jgrapes.net that implement IOSubchannelMethods in org.jgrapes.net with parameters of type IOSubchannelModifier and TypeMethodDescriptionvoidSslCodec.onAccepted(Accepted event, IOSubchannel encryptedChannel) Creates a new downstream connection asLinkedIOSubchannelof the network connection together with anSSLEngine.voidSslCodec.onClosed(Closed<Void> event, IOSubchannel encryptedChannel) Handles a close event from the encrypted channel (client).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).voidSslCodec.onPurge(Purge event, IOSubchannel encryptedChannel) Forwards aPurgeevent downstream.