org.glassfish.jersey.server

## Class ContainerMessageBodyWorkersInitializer

- java.lang.Object
- - org.glassfish.jersey.server.ContainerMessageBodyWorkersInitializer

All Implemented Interfaces:
  Function<org.glassfish.jersey.server.internal.process.RequestProcessingContext,org.glassfish.jersey.server.internal.process.RequestProcessingContext>

    public class ContainerMessageBodyWorkersInitializer
    extends Object
    implements Function<org.glassfish.jersey.server.internal.process.RequestProcessingContext,org.glassfish.jersey.server.internal.process.RequestProcessingContext>

Function that can be put to an acceptor chain to properly initialize `MessageBodyWorkers` instance on a current request and response.

Author:
  Marek Potociar

### Constructor Summary

Constructors
Constructor and Description
`ContainerMessageBodyWorkersInitializer(jakarta.inject.Provider<MessageBodyWorkers> workersFactory)` Create new `MessageBodyWorkers` initialization function for requests and responses.

### Method Summary

All Methods Instance Methods Concrete Methods
`org.glassfish.jersey.server.internal.process.RequestProcessingContext` `apply(org.glassfish.jersey.server.internal.process.RequestProcessingContext requestContext)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.function.Function

`andThen, compose, identity`

### Constructor Detail

#### ContainerMessageBodyWorkersInitializer

    @Inject
    public ContainerMessageBodyWorkersInitializer(jakarta.inject.Provider<MessageBodyWorkers> workersFactory)

Create new `MessageBodyWorkers` initialization function for requests and responses.

Parameters:
  `workersFactory` - `MessageBodyWorkers` factory.

### Method Detail

#### apply

    public org.glassfish.jersey.server.internal.process.RequestProcessingContext apply(org.glassfish.jersey.server.internal.process.RequestProcessingContext requestContext)

Specified by:
  `apply` in interface `Function<org.glassfish.jersey.server.internal.process.RequestProcessingContext,org.glassfish.jersey.server.internal.process.RequestProcessingContext>`