Package org.ldaptive.transport
Class MessageFunctional<Q extends Request,S extends Result>
java.lang.Object
org.ldaptive.AbstractFreezable
org.ldaptive.transport.MessageFunctional<Q,S>
- Type Parameters:
Q- type of requestS- type of result
- All Implemented Interfaces:
Freezable
- Direct Known Subclasses:
MessageFunctional.BiConsumer,MessageFunctional.Consumer,MessageFunctional.Function
public abstract class MessageFunctional<Q extends Request,S extends Result>
extends AbstractFreezable
Base class for processing a message that is initialized with properties from the handle.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classMarker class to inject handle properties.static classMarker class to inject handle properties.static classMarker class to inject handle properties. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ConnectionConnection the request occurred on.private OperationHandle<Q,S> Operation handle that sent the request.private QRequest that produced the message. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the connection.Returns the handle.Returns the request.abstract MessageFunctional<Q,S> Create a new instance of this message functional.voidsetConnection(Connection conn) Sets the connection.voidsetHandle(OperationHandle<Q, S> h) Sets the handle.voidsetRequest(Q req) Sets the request.Methods inherited from class org.ldaptive.AbstractFreezable
assertMutable, freeze, freeze, freeze, isFrozen
-
Field Details
-
connection
Connection the request occurred on. -
request
Request that produced the message. -
handle
Operation handle that sent the request.
-
-
Constructor Details
-
MessageFunctional
public MessageFunctional()
-
-
Method Details
-
getConnection
Returns the connection.- Returns:
- connection
-
setConnection
Sets the connection.- Parameters:
conn- connection
-
getRequest
Returns the request.- Returns:
- request
-
setRequest
Sets the request.- Parameters:
req- request
-
getHandle
Returns the handle.- Returns:
- handle
-
setHandle
Sets the handle.- Parameters:
h- handle
-
newInstance
Create a new instance of this message functional.- Returns:
- new instance of this message functional
-