Liking cljdoc? Tell your friends :D

net.ty.pipeline

Utilities to build and work with Netty pipelines

Utilities to build and work with Netty pipelines
raw docstring

*channel*clj

Thread-local binding for a channel

Thread-local binding for a channel
sourceraw docstring

->byte-ordercljmultimethod

Concerts to a ByteOrder

Concerts to a ByteOrder
sourceraw docstring

add-lastclj

(add-last pipeline nick handler)
source

build-pipelineclj

(build-pipeline handlers chan)

Build a pipeline from a list of handlers. Binds *channel* to the given chan argument and runs through handlers.

When handlers are functions, call them with no arguments, otherwise add them directly to the ChannelHandler list.

Yields an array of ChannelHandler instances

Build a pipeline from a list of handlers. Binds `*channel*` to
the given `chan` argument and runs through handlers.

When handlers are functions, call them with no arguments, otherwise
add them directly to the **ChannelHandler** list.

Yields an array of **ChannelHandler** instances
sourceraw docstring

channel-initializerclj

(channel-initializer pipeline)

Build a channel initializer from a pipeline, expressed as a sequence of ChannelHandler, see build-pipeline for how to express this.

Build a channel initializer from a pipeline, expressed as a
sequence of **ChannelHandler**, see `build-pipeline` for how
to express this.
sourceraw docstring

ChannelActivecljprotocol

Implement this protocol when you want your adapter to be notified for channel activation.

Implement this protocol when you want your adapter to be
notified for channel activation.

channel-activeclj

(channel-active this ctx)

Called when the channel becomes active

Called when the channel becomes active
sourceraw docstring

ChannelInactivecljprotocol

Implement this protocol when you want your adapter to be notified for channel deactivation.

Implement this protocol when you want your adapter to be
notified for channel deactivation.

channel-inactiveclj

(channel-inactive this ctx)

Called when the channel becomes inactive

Called when the channel becomes inactive
sourceraw docstring

ChannelReadCompletecljprotocol

Implement this protocol when you want your adapter to be notified of a read complete status.

Implement this protocol when you want your adapter to be
notified of a read complete status.

channel-read-completeclj

(channel-read-complete this ctx)

Called when read has completed

Called when read has completed
sourceraw docstring

ChannelRegisteredcljprotocol

Implement this protocol when you want your adapter to be notified for channel registration.

Implement this protocol when you want your adapter to be
notified for channel registration.

channel-registeredclj

(channel-registered this ctx)

Called upon channel registration

Called upon channel registration
sourceraw docstring

ChannelUnregisteredcljprotocol

Implement this protocol when you want your adapter to be notified for channel deregistration.

Implement this protocol when you want your adapter to be
notified for channel deregistration.

channel-unregisteredclj

(channel-unregistered this ctx)

Called when channel is deregistered

Called when channel is deregistered
sourceraw docstring

ChannelWritabilityChangedcljprotocol

Implement this protocol when you want your adapter to be notified of changes in channel writability.

Implement this protocol when you want your adapter to be
notified of changes in channel writability.

channel-writability-changedclj

(channel-writability-changed this ctx)

Called when writability has changed on a channel

Called when writability has changed on a channel
sourceraw docstring

charset->charset-utilcljmultimethod

converts to a CharsetUtil

converts to a CharsetUtil
sourceraw docstring

defdecoderclj/smacro

(defdecoder sym [msg ctx shareable?] & body)

Define decoders

Define decoders
sourceraw docstring

defencoderclj/smacro

(defencoder sym [msg ctx shareable?] & body)

Define encoder

Define encoder
sourceraw docstring

ExceptionCaughtcljprotocol

Implement this protocol when you want your adapter to be notified of channel exception.

Implement this protocol when you want your adapter to be
notified of channel exception.

exception-caughtclj

(exception-caught this ctx e)

Called for channel exceptions

Called for channel exceptions
sourceraw docstring

flush!clj

(flush! ctx)

Flush context

Flush context
sourceraw docstring

HandlerAdaptercljprotocol

This is the minimum an adapter must implement to be proxied to a valid ChannelHandlerAdapter

This is the minimum an adapter must implement to be proxied
to a valid ChannelHandlerAdapter

channel-readclj

(channel-read this ctx input)

Called for each new payload on a channel

Called for each new payload on a channel
sourceraw docstring

IsSharablecljprotocol

Implement this protocol for adapters when you want to report whether the adapter can be shared or not. When not implemented adapters will be deemed unsharable.

While it may look more natural to write sharable as shareable, it is apparently valid english and is the way netty spells it out.

Implement this protocol for adapters when you want to report
whether the adapter can be shared or not. When not implemented
adapters will be deemed unsharable.

While it may look more natural to write sharable as shareable,
it is apparently valid english and is the way netty spells it out.

is-sharable?clj

(is-sharable? this)

Returns whether the handler adapter is sharable

Returns whether the handler adapter is sharable
sourceraw docstring

length-field-based-frame-decoderclj

(length-field-based-frame-decoder)
(length-field-based-frame-decoder {:keys [byte-order max offset length adjust
                                          strip fail-fast?]})

Create a length field based frame decoder.

Create a length field based frame decoder.
sourceraw docstring

length-field-prependerclj

(length-field-prepender)
(length-field-prepender {:keys [length byte-order adjust includes-length?]})

Creates an encoder that adds length-fields

Creates an encoder that adds length-fields
sourceraw docstring

line-based-frame-decoderclj

(line-based-frame-decoder)
(line-based-frame-decoder max-length)
(line-based-frame-decoder max-length strip-delimiter?)
(line-based-frame-decoder max-length strip-delimiter? fail-fast?)

Builds a ChannelHandler which parses lines.

Builds a ChannelHandler which parses lines.
sourceraw docstring

line-frame-encoderclj

(line-frame-encoder)

Encode outbound payloads as lines, appending telnet-style carriage returns

Encode outbound payloads as lines, appending telnet-style carriage returns
sourceraw docstring

make-handler-adapterclj

(make-handler-adapter adapter)

From an implemenation of net.ty.pipeline.HandlerAdapater, yield a proxied ChannelInboundHandlerAdapter.

Adapters may optionally implement any or all of the following protocols: IsSharable, ChannelActive, ChannelInactive, ChannelReadComplete, ChannelRegistered, ChannelUnregistered, ExceptionCaught, ChannelWritabilityChanged, and UserEventTriggered.

To circumvent CLJ-1814 we cover the most common cases and otherwise build a set of known operations to avoid calling satisfies? at runtime.

From an implemenation of net.ty.pipeline.HandlerAdapater,
yield a proxied ChannelInboundHandlerAdapter.

Adapters may optionally implement any or all of the following
protocols: `IsSharable`, `ChannelActive`, `ChannelInactive`,
`ChannelReadComplete`, `ChannelRegistered`, `ChannelUnregistered`,
`ExceptionCaught`, `ChannelWritabilityChanged`, and
`UserEventTriggered`.

To circumvent CLJ-1814 we cover the most common cases and otherwise
build a set of known operations to avoid calling `satisfies?` at runtime.
sourceraw docstring

read-timeout-handlerclj

(read-timeout-handler timeout)
(read-timeout-handler timeout unit)

Build a ChannelHandler which times-out when no payload is read

Build a ChannelHandler which times-out when no payload is read
sourceraw docstring

string-decoderclj

(string-decoder)
(string-decoder charset)

A decoder that coerces to string

A decoder that coerces to string
sourceraw docstring

string-encoderclj

(string-encoder)
(string-encoder charset)

A encoder that coerces from strings

A encoder that coerces from strings
sourceraw docstring

supported-signaturesclj

(supported-signatures ap)
source

unit->time-unitcljmultimethod

Converts to a java util concurrent TimeUnit

Converts to a java util concurrent TimeUnit
sourceraw docstring

UserEventTriggeredcljprotocol

Implement this protocol when you want your adapter to be notified of user events.

Implement this protocol when you want your adapter to be
notified of user events.

user-event-triggeredclj

(user-event-triggered this ctx event)

Called when a user event has been triggered on a channel

Called when a user event has been triggered on a channel
sourceraw docstring

with-inputclj/smacro

(with-input [ctx input] & body)

Inline definition of a ChannelInboundHandlerAdapter which captures context and input and executes body.

Inline definition of a **ChannelInboundHandlerAdapter** which
captures context and input and executes body.
sourceraw docstring

write!clj

(write! ctx msg)

Write message to context

Write message to context
sourceraw docstring

write-and-flush!clj

(write-and-flush! ctx msg)

Write message to context, then flush context

Write message to context, then flush context
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close