接口的使用
org.springframework.core.io.buffer.DataBufferFactory
使用DataBufferFactory的程序包 程序包 说明 org.springframework.core.codec org.springframework.core.io.buffer Generic abstraction for working with byte buffer implementations.org.springframework.http Contains a basic abstraction over client/server-side HTTP.org.springframework.http.client.reactive Abstractions for reactive HTTP client support includingClientHttpRequest
andClientHttpResponse
as well as aClientHttpConnector
.org.springframework.http.codec.cbor org.springframework.http.codec.json JSON encoder and decoder support.org.springframework.http.codec.protobuf Provides an encoder and a decoder for Google Protocol Buffers.org.springframework.http.codec.xml XML encoder and decoder support.org.springframework.http.server.reactive Abstractions for reactive HTTP server support including aServerHttpRequest
andServerHttpResponse
along with anHttpHandler
for processing.org.springframework.messaging.rsocket Support for the RSocket protocol.org.springframework.mock.http.client.reactive Mock implementations of reactive HTTP client contracts.org.springframework.mock.http.server.reactive Mock implementations of reactive HTTP server contracts.org.springframework.web.reactive.socket Abstractions and support classes for reactive WebSocket interactions.org.springframework.web.reactive.socket.adapter Classes adapting Spring's Reactive WebSocket API to and from WebSocket runtimes.org.springframework.web.reactive.socket.client Client support for WebSocket interactions.org.springframework.core.codec中DataBufferFactory的使用
参数类型为DataBufferFactory的org.springframework.core.codec中的方法 修饰符和类型 方法 说明 reactor.core.publisher.Flux<DataBuffer>
AbstractSingleValueEncoder. encode(org.reactivestreams.Publisher<? extends T> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
protected abstract reactor.core.publisher.Flux<DataBuffer>
AbstractSingleValueEncoder. encode(T t, DataBufferFactory dataBufferFactory, ResolvableType type, MimeType mimeType, Map<String,Object> hints)
EncodeT
to an outputDataBuffer
stream.reactor.core.publisher.Flux<DataBuffer>
ByteArrayEncoder. encode(org.reactivestreams.Publisher<? extends byte[]> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Flux<DataBuffer>
ByteBufferEncoder. encode(org.reactivestreams.Publisher<? extends ByteBuffer> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Flux<DataBuffer>
CharSequenceEncoder. encode(org.reactivestreams.Publisher<? extends CharSequence> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Flux<DataBuffer>
DataBufferEncoder. encode(org.reactivestreams.Publisher<? extends DataBuffer> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Flux<DataBuffer>
Encoder. encode(org.reactivestreams.Publisher<? extends T> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
Encode a stream of Objects of typeT
into aDataBuffer
output stream.protected reactor.core.publisher.Flux<DataBuffer>
ResourceEncoder. encode(Resource resource, DataBufferFactory bufferFactory, ResolvableType type, MimeType mimeType, Map<String,Object> hints)
reactor.core.publisher.Flux<DataBuffer>
ResourceRegionEncoder. encode(org.reactivestreams.Publisher<? extends ResourceRegion> input, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
DataBuffer
ByteArrayEncoder. encodeValue(byte[] bytes, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)
DataBuffer
ByteBufferEncoder. encodeValue(ByteBuffer byteBuffer, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)
DataBuffer
CharSequenceEncoder. encodeValue(CharSequence charSequence, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)
DataBuffer
DataBufferEncoder. encodeValue(DataBuffer buffer, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)
default DataBuffer
Encoder. encodeValue(T value, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)
Encode an Object of type T to a data buffer.org.springframework.core.io.buffer中DataBufferFactory的使用
实现DataBufferFactory的org.springframework.core.io.buffer中的类 修饰符和类型 类 说明 class
DefaultDataBufferFactory
Default implementation of theDataBufferFactory
interface.class
NettyDataBufferFactory
Implementation of theDataBufferFactory
interface based on a NettyByteBufAllocator
.返回DataBufferFactory的org.springframework.core.io.buffer中的方法 修饰符和类型 方法 说明 DataBufferFactory
DataBuffer. factory()
Return theDataBufferFactory
that created this buffer.DataBufferFactory
DataBufferWrapper. factory()
参数类型为DataBufferFactory的org.springframework.core.io.buffer中的方法 修饰符和类型 方法 说明 static reactor.core.publisher.Flux<DataBuffer>
DataBufferUtils. read(Path path, DataBufferFactory bufferFactory, int bufferSize, OpenOption... options)
Read bytes from the given filePath
into aFlux
ofDataBuffer
s.static reactor.core.publisher.Flux<DataBuffer>
DataBufferUtils. read(Resource resource, long position, DataBufferFactory bufferFactory, int bufferSize)
Read the givenResource
into aFlux
ofDataBuffer
s starting at the given position.static reactor.core.publisher.Flux<DataBuffer>
DataBufferUtils. read(Resource resource, DataBufferFactory bufferFactory, int bufferSize)
Read the givenResource
into aFlux
ofDataBuffer
s.static reactor.core.publisher.Flux<DataBuffer>
DataBufferUtils. readAsynchronousFileChannel(Callable<AsynchronousFileChannel> channelSupplier, long position, DataBufferFactory bufferFactory, int bufferSize)
Obtain aAsynchronousFileChannel
from the given supplier, and read it into aFlux
ofDataBuffer
s, starting at the given position.static reactor.core.publisher.Flux<DataBuffer>
DataBufferUtils. readAsynchronousFileChannel(Callable<AsynchronousFileChannel> channelSupplier, DataBufferFactory bufferFactory, int bufferSize)
Obtain aAsynchronousFileChannel
from the given supplier, and read it into aFlux
ofDataBuffer
s.static reactor.core.publisher.Flux<DataBuffer>
DataBufferUtils. readByteChannel(Callable<ReadableByteChannel> channelSupplier, DataBufferFactory bufferFactory, int bufferSize)
static reactor.core.publisher.Flux<DataBuffer>
DataBufferUtils. readInputStream(Callable<InputStream> inputStreamSupplier, DataBufferFactory bufferFactory, int bufferSize)
org.springframework.http中DataBufferFactory的使用
返回DataBufferFactory的org.springframework.http中的方法 修饰符和类型 方法 说明 DataBufferFactory
ReactiveHttpOutputMessage. bufferFactory()
Return aDataBufferFactory
that can be used to create the body.org.springframework.http.client.reactive中DataBufferFactory的使用
返回DataBufferFactory的org.springframework.http.client.reactive中的方法 修饰符和类型 方法 说明 DataBufferFactory
ClientHttpRequestDecorator. bufferFactory()
参数类型为DataBufferFactory的org.springframework.http.client.reactive中的方法 修饰符和类型 方法 说明 void
JettyClientHttpConnector. setBufferFactory(DataBufferFactory bufferFactory)
org.springframework.http.codec.cbor中DataBufferFactory的使用
参数类型为DataBufferFactory的org.springframework.http.codec.cbor中的方法 修饰符和类型 方法 说明 reactor.core.publisher.Flux<DataBuffer>
Jackson2CborEncoder. encode(org.reactivestreams.Publisher<?> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
org.springframework.http.codec.json中DataBufferFactory的使用
参数类型为DataBufferFactory的org.springframework.http.codec.json中的方法 修饰符和类型 方法 说明 reactor.core.publisher.Flux<DataBuffer>
AbstractJackson2Encoder. encode(org.reactivestreams.Publisher<?> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
DataBuffer
AbstractJackson2Encoder. encodeValue(Object value, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)
org.springframework.http.codec.protobuf中DataBufferFactory的使用
参数类型为DataBufferFactory的org.springframework.http.codec.protobuf中的方法 修饰符和类型 方法 说明 reactor.core.publisher.Flux<DataBuffer>
ProtobufEncoder. encode(org.reactivestreams.Publisher<? extends com.google.protobuf.Message> inputStream, DataBufferFactory bufferFactory, ResolvableType elementType, MimeType mimeType, Map<String,Object> hints)
DataBuffer
ProtobufEncoder. encodeValue(com.google.protobuf.Message message, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)
org.springframework.http.codec.xml中DataBufferFactory的使用
参数类型为DataBufferFactory的org.springframework.http.codec.xml中的方法 修饰符和类型 方法 说明 protected reactor.core.publisher.Flux<DataBuffer>
Jaxb2XmlEncoder. encode(Object value, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)
DataBuffer
Jaxb2XmlEncoder. encodeValue(Object value, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String,Object> hints)
org.springframework.http.server.reactive中DataBufferFactory的使用
返回DataBufferFactory的org.springframework.http.server.reactive中的方法 修饰符和类型 方法 说明 DataBufferFactory
AbstractServerHttpResponse. bufferFactory()
DataBufferFactory
ServerHttpResponseDecorator. bufferFactory()
DataBufferFactory
ServletHttpHandlerAdapter. getDataBufferFactory()
DataBufferFactory
UndertowHttpHandlerAdapter. getDataBufferFactory()
参数类型为DataBufferFactory的org.springframework.http.server.reactive中的方法 修饰符和类型 方法 说明 void
ServletHttpHandlerAdapter. setDataBufferFactory(DataBufferFactory dataBufferFactory)
void
UndertowHttpHandlerAdapter. setDataBufferFactory(DataBufferFactory bufferFactory)
参数类型为DataBufferFactory的org.springframework.http.server.reactive中的构造器 构造器 说明 AbstractListenerServerHttpResponse(DataBufferFactory dataBufferFactory)
AbstractListenerServerHttpResponse(DataBufferFactory dataBufferFactory, HttpHeaders headers)
AbstractServerHttpResponse(DataBufferFactory dataBufferFactory)
AbstractServerHttpResponse(DataBufferFactory dataBufferFactory, HttpHeaders headers)
org.springframework.messaging.rsocket中DataBufferFactory的使用
返回DataBufferFactory的org.springframework.messaging.rsocket中的方法 修饰符和类型 方法 说明 DataBufferFactory
RSocketStrategies. dataBufferFactory()
Return the configureddataBufferFactory
.参数类型为DataBufferFactory的org.springframework.messaging.rsocket中的方法 修饰符和类型 方法 说明 RSocketStrategies.Builder
RSocketStrategies.Builder. dataBufferFactory(DataBufferFactory bufferFactory)
Configure the DataBufferFactory to use for allocating buffers when preparing requests or creating responses.static DataBuffer
PayloadUtils. retainDataAndReleasePayload(io.rsocket.Payload payload, DataBufferFactory bufferFactory)
Use this method to slice, retain and wrap the data portion of thePayload
, and also to release thePayload
.org.springframework.mock.http.client.reactive中DataBufferFactory的使用
返回DataBufferFactory的org.springframework.mock.http.client.reactive中的方法 修饰符和类型 方法 说明 DataBufferFactory
MockClientHttpRequest. bufferFactory()
org.springframework.mock.http.server.reactive中DataBufferFactory的使用
参数类型为DataBufferFactory的org.springframework.mock.http.server.reactive中的构造器 构造器 说明 MockServerHttpResponse(DataBufferFactory dataBufferFactory)
org.springframework.web.reactive.socket中DataBufferFactory的使用
返回DataBufferFactory的org.springframework.web.reactive.socket中的方法 修饰符和类型 方法 说明 DataBufferFactory
WebSocketSession. bufferFactory()
Return aDataBuffer
Factory to create message payloads.类型变量类型为DataBufferFactory的org.springframework.web.reactive.socket中的方法参数 修饰符和类型 方法 说明 WebSocketMessage
WebSocketSession. binaryMessage(Function<DataBufferFactory,DataBuffer> payloadFactory)
Factory method to create a binary WebSocketMessage using theWebSocketSession.bufferFactory()
for the session.WebSocketMessage
WebSocketSession. pingMessage(Function<DataBufferFactory,DataBuffer> payloadFactory)
Factory method to create a ping WebSocketMessage using theWebSocketSession.bufferFactory()
for the session.WebSocketMessage
WebSocketSession. pongMessage(Function<DataBufferFactory,DataBuffer> payloadFactory)
Factory method to create a pong WebSocketMessage using theWebSocketSession.bufferFactory()
for the session.org.springframework.web.reactive.socket.adapter中DataBufferFactory的使用
返回DataBufferFactory的org.springframework.web.reactive.socket.adapter中的方法 修饰符和类型 方法 说明 DataBufferFactory
AbstractWebSocketSession. bufferFactory()
类型变量类型为DataBufferFactory的org.springframework.web.reactive.socket.adapter中的方法参数 修饰符和类型 方法 说明 WebSocketMessage
AbstractWebSocketSession. binaryMessage(Function<DataBufferFactory,DataBuffer> payloadFactory)
WebSocketMessage
AbstractWebSocketSession. pingMessage(Function<DataBufferFactory,DataBuffer> payloadFactory)
WebSocketMessage
AbstractWebSocketSession. pongMessage(Function<DataBufferFactory,DataBuffer> payloadFactory)
参数类型为DataBufferFactory的org.springframework.web.reactive.socket.adapter中的构造器 构造器 说明 AbstractListenerWebSocketSession(T delegate, String id, HandshakeInfo handshakeInfo, DataBufferFactory bufferFactory)
Base constructor.AbstractListenerWebSocketSession(T delegate, String id, HandshakeInfo info, DataBufferFactory bufferFactory, reactor.core.publisher.MonoProcessor<Void> completionMono)
Alternative constructor with completionMono<Void>
to propagate the session completion (success or error) (for client-side use).AbstractWebSocketSession(T delegate, String id, HandshakeInfo info, DataBufferFactory bufferFactory)
Create a new WebSocket session.JettyWebSocketSession(org.eclipse.jetty.websocket.api.Session session, HandshakeInfo info, DataBufferFactory factory)
JettyWebSocketSession(org.eclipse.jetty.websocket.api.Session session, HandshakeInfo info, DataBufferFactory factory, reactor.core.publisher.MonoProcessor<Void> completionMono)
StandardWebSocketSession(Session session, HandshakeInfo info, DataBufferFactory factory)
StandardWebSocketSession(Session session, HandshakeInfo info, DataBufferFactory factory, reactor.core.publisher.MonoProcessor<Void> completionMono)
TomcatWebSocketSession(Session session, HandshakeInfo info, DataBufferFactory factory)
TomcatWebSocketSession(Session session, HandshakeInfo info, DataBufferFactory factory, reactor.core.publisher.MonoProcessor<Void> completionMono)
UndertowWebSocketSession(io.undertow.websockets.core.WebSocketChannel channel, HandshakeInfo info, DataBufferFactory factory)
UndertowWebSocketSession(io.undertow.websockets.core.WebSocketChannel channel, HandshakeInfo info, DataBufferFactory factory, reactor.core.publisher.MonoProcessor<Void> completionMono)
org.springframework.web.reactive.socket.client中DataBufferFactory的使用
返回DataBufferFactory的org.springframework.web.reactive.socket.client中的方法 修饰符和类型 方法 说明 protected DataBufferFactory
StandardWebSocketClient. bufferFactory()