public interface StreamMonitor
| Modifier and Type | Method and Description |
|---|---|
void |
assign(MonitoringContext context,
AttributedURI optionalMessageId)
This method will be invoked by the framework if a message is finally built up and should be
assigned to the
OutputStream created with the getOutputStream method. |
void |
discard(MonitoringContext context,
int discardReason) |
void |
fault(MonitoringContext context,
java.lang.Exception e)
This is a fault method which will be invoked if the framework could not build a correct message
object.
|
MonitoringContext |
getMonitoringContext() |
java.io.OutputStream |
getOutputStream()
A new and shiny
OutputStream to write new bytes from incoming or outgoing
connections etc. |
void |
noContent(MonitoringContext context,
java.lang.String reason) |
void |
request(MonitoringContext context,
URI location) |
void |
resetMonitoringContext() |
void |
resource(MonitoringContext context,
Resource resource) |
void |
setMonitoringContext(MonitoringContext context) |
java.io.OutputStream getOutputStream()
OutputStream to write new bytes from incoming or outgoing
connections etc.
Remember: This method should always return the same OutputStream for an
individual StreamMonitor because it is used in different parts of the framework.
OutputStream.void resetMonitoringContext()
MonitoringContext getMonitoringContext()
void setMonitoringContext(MonitoringContext context)
void assign(MonitoringContext context, AttributedURI optionalMessageId)
OutputStream created with the getOutputStream method.
The assigned message is contained in the monitoring context.context - the context which should be assigned to the OutputStreamoptionalMessageId - void fault(MonitoringContext context, java.lang.Exception e)
assign method, but points to a fault while the message is
created.void discard(MonitoringContext context, int discardReason)
void resource(MonitoringContext context, Resource resource)
void request(MonitoringContext context, URI location)
void noContent(MonitoringContext context, java.lang.String reason)