Package com.rabbitmq.client.amqp
Interface Responder.Context
- Enclosing interface:
Responder
public static interface Responder.Context
Request processing context.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isRequesterAlive
(Message request) Tell whether the requester is still able to receive the response.message()
Create a message meant to be published by the underlying publisher instance.message
(byte[] body) Create a message meant to be published by the underlying publisher instance.
-
Method Details
-
isRequesterAlive
Tell whether the requester is still able to receive the response.The call assumes a reply-to queue address has been set on the request message and checks whether this queue still exists or not.
A time-consuming request handler can use this call from time to time to make sure it still worth keeping processing the request.
- Parameters:
request
- the incoming request- Returns:
- true if the requester is still considered alive, false otherwise
-
message
Message message()Create a message meant to be published by the underlying publisher instance.Once returned in the
Responder.Handler.handle(Context, Message)
the message instance should be not be modified or even reused.- Returns:
- a message
-
message
Create a message meant to be published by the underlying publisher instance.Once returned in the
Responder.Handler.handle(Context, Message)
the message instance should be not be modified or even reused.- Parameters:
body
- message body- Returns:
- a message with the provided body
-