Package org.somda.sdc.dpws
Class CommunicationLogDummyImpl
- java.lang.Object
-
- org.somda.sdc.dpws.CommunicationLogDummyImpl
-
- All Implemented Interfaces:
CommunicationLog
public class CommunicationLogDummyImpl extends Object implements CommunicationLog
Implementation ofCommunicationLogthat does not output anything.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.somda.sdc.dpws.CommunicationLog
CommunicationLog.Direction, CommunicationLog.MessageType, CommunicationLog.TransportType
-
-
Constructor Summary
Constructors Constructor Description CommunicationLogDummyImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OutputStreamlogMessage(CommunicationLog.Direction direction, CommunicationLog.TransportType transportType, CommunicationLog.MessageType messageType, CommunicationContext communicationContext)Creates an OutputStream to write the log message into.InputStreamlogMessage(CommunicationLog.Direction direction, CommunicationLog.TransportType transportType, CommunicationLog.MessageType messageType, CommunicationContext communicationContext, InputStream message)Logs an HTTP message based on an InputStream.OutputStreamlogMessage(CommunicationLog.Direction direction, CommunicationLog.TransportType transportType, CommunicationLog.MessageType messageType, CommunicationContext communicationContext, OutputStream message)Logs an HTTP message based on an OutputStream.
-
-
-
Method Detail
-
logMessage
public OutputStream logMessage(CommunicationLog.Direction direction, CommunicationLog.TransportType transportType, CommunicationLog.MessageType messageType, CommunicationContext communicationContext, OutputStream message)
Description copied from interface:CommunicationLogLogs an HTTP message based on an OutputStream.It does not block i.e. it can return before data is written to the output.
- Specified by:
logMessagein interfaceCommunicationLog- Parameters:
direction- direction used for filename.transportType- the transport protocol used i.e. udp, http, etc.messageType- the type of the message i.e. request, response.communicationContext- communication information such as target address and portmessage- the output stream to branch to the log file.- Returns:
- an output stream, that streams to the original output stream and optionally streams to another stream similarly to the tee Unix command. The other stream can be a log file stream.
-
logMessage
public OutputStream logMessage(CommunicationLog.Direction direction, CommunicationLog.TransportType transportType, CommunicationLog.MessageType messageType, CommunicationContext communicationContext)
Description copied from interface:CommunicationLogCreates an OutputStream to write the log message into.- Specified by:
logMessagein interfaceCommunicationLog- Parameters:
direction- direction used for filename.transportType- the transport protocol used i.e. udp, http, etc.messageType- the type of the message i.e. request, response.communicationContext- communication information such as target address and port.- Returns:
- an output stream to write the log message into.
-
logMessage
public InputStream logMessage(CommunicationLog.Direction direction, CommunicationLog.TransportType transportType, CommunicationLog.MessageType messageType, CommunicationContext communicationContext, InputStream message)
Description copied from interface:CommunicationLogLogs an HTTP message based on an InputStream.It blocks until everything has been read.
- Specified by:
logMessagein interfaceCommunicationLog- Parameters:
direction- direction used for filename.transportType- the transport protocol used i.e. udp, http, etc.messageType- the type of the message i.e. request, response.communicationContext- communication information such as target address and portmessage- the message to log as input stream. As the input stream might be unusable after reading, another one is created to be used for further processing; see return value.- Returns:
- a new input stream that mirrors the data from the message input data.
-
-