public interface MessageObserver
MessageObserver may be registered on a HTTP Message and
will be called, when the message's body becomes fully known to Membrane.
A typical example of an interceptor using MessageObserver is the
ExchangeStoreInterceptor, whose primary purpose is to write the
message's body into permanent storage. As this requires reading the body,
directly "streaming" the body from the HTTP client to the HTTP server (as
described in AbstractBody) would not be possible. Instead,
ExchangeStoreInterceptor registers a MessageObserver on the
message. This MessageObserver will be called back once streaming has
been completed and the messages' body is fully known. The
MessageObserver will then write the body into permanent storage.| Modifier and Type | Method and Description |
|---|---|
void |
bodyComplete(AbstractBody body)
Notification that the body has fully been received.
|
void |
bodyRequested(AbstractBody body) |
void bodyRequested(AbstractBody body)
void bodyComplete(AbstractBody body)
Message.addObserver(MessageObserver)), as the body may have
already been fully received when registering the observer.
This is the last event that will be fired on any MessageObserver.Copyright © 2022. All Rights Reserved.