Top Fields Constructors Methods
org.eclipse.jetty.ee10.websocket.jakarta.common.encoders

public Class AvailableEncoders

extends Object
implements Predicate<Class<?>>, Closeable
Class Inheritance
All Implemented Interfaces
java.io.Closeable, java.lang.AutoCloseable, java.util.function.Predicate
Imports
java.io.Closeable, java.lang.reflect.InvocationTargetException, java.nio.ByteBuffer, java.util.LinkedList, .List, .NoSuchElementException, .Objects, java.util.function.Predicate, java.util.stream.Collectors, jakarta.websocket.Encoder, .EndpointConfig, org.eclipse.jetty.ee10.websocket.jakarta.common.InitException, org.eclipse.jetty.websocket.core.WebSocketComponents, org.eclipse.jetty.websocket.core.exception.InvalidSignatureException, .InvalidWebSocketException, org.eclipse.jetty.websocket.core.util.ReflectUtils, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private final WebSocketComponents
private final EndpointConfig
private static final Logger
private final LinkedList<RegisteredEncoder>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
add(Class<? extends Encoder> encoder, Class<? extends Encoder> interfaceClass)

public void
close()

Implements java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.

public Class<? extends Encoder>
public Encoder
public RegisteredEncoder
public void
register(Class<? extends Encoder> encoder)

public void
registerAll(Class<? extends Encoder>[] encoders)

public void
registerAll(List<Class<? extends Encoder>> encoders)

private void
registerPrimitive(Class<? extends Encoder> encoderClass, Class<? extends Encoder> interfaceType, Class<?> type)

public List<RegisteredEncoder>
supporting(Class<? extends Encoder> interfaceType)

public boolean
test(Class<?>
the input argument
type
)

Implements java.util.function.Predicate.test.

Evaluates this predicate on the given argument.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

componentsback to summary
private final WebSocketComponents components
configback to summary
private final EndpointConfig config
LOGback to summary
private static final Logger LOG
registeredEncodersback to summary
private final LinkedList<RegisteredEncoder> registeredEncoders

Constructor Detail

AvailableEncodersback to summary
public AvailableEncoders(EndpointConfig config, WebSocketComponents components)

Method Detail

addback to summary
private void add(Class<? extends Encoder> encoder, Class<? extends Encoder> interfaceClass)
closeback to summary
public void close()

Implements java.io.Closeable.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override
getEncoderForback to summary
public Class<? extends Encoder> getEncoderFor(Class<?> type)
getInstanceForback to summary
public Encoder getInstanceFor(Class<?> type)
getRegisteredEncoderForback to summary
public RegisteredEncoder getRegisteredEncoderFor(Class<?> type)
registerback to summary
public void register(Class<? extends Encoder> encoder)
registerAllback to summary
public void registerAll(Class<? extends Encoder>[] encoders)
registerAllback to summary
public void registerAll(List<Class<? extends Encoder>> encoders)
registerPrimitiveback to summary
private void registerPrimitive(Class<? extends Encoder> encoderClass, Class<? extends Encoder> interfaceType, Class<?> type)
supportingback to summary
public List<RegisteredEncoder> supporting(Class<? extends Encoder> interfaceType)
testback to summary
public boolean test(Class<?> type)

Implements java.util.function.Predicate.test.

Doc from java.util.function.Predicate.test.

Evaluates this predicate on the given argument.

Parameters
type:Class<?>

the input argument

Returns:boolean

true if the input argument matches the predicate, otherwise false

Annotations
@Override