Package org.somda.sdc.dpws
Interface CommunicationLog
-
- All Implemented Interfaces:
public interface CommunicationLogCommunication log interface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumCommunicationLog.DirectionDirection enumeration.
public enumCommunicationLog.TransportTypeDefines the transport type.
public enumCommunicationLog.MessageTypeDefines the message type.
-
Method Summary
Modifier and Type Method Description abstract OutputStreamlogMessage(CommunicationLog.Direction direction, CommunicationLog.TransportType transportType, CommunicationLog.MessageType messageType, CommunicationContext communicationContext, OutputStream message)Logs a message based on an OutputStream. abstract OutputStreamlogMessage(CommunicationLog.Direction direction, CommunicationLog.TransportType transportType, CommunicationLog.MessageType messageType, CommunicationContext communicationContext)Creates an OutputStream to write the log message into. abstract InputStreamlogMessage(CommunicationLog.Direction direction, CommunicationLog.TransportType transportType, CommunicationLog.MessageType messageType, CommunicationContext communicationContext, InputStream message)Logs a message based on an InputStream. -
-
Method Detail
-
logMessage
abstract OutputStream logMessage(CommunicationLog.Direction direction, CommunicationLog.TransportType transportType, CommunicationLog.MessageType messageType, CommunicationContext communicationContext, OutputStream message)
Logs a message based on an OutputStream.
It does not block i.e. it can return before data is written to the output.
- Parameters:
direction- direction used for filename.transportType- the transport protocol used i.e.messageType- the type of the message i.e.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
abstract OutputStream logMessage(CommunicationLog.Direction direction, CommunicationLog.TransportType transportType, CommunicationLog.MessageType messageType, CommunicationContext communicationContext)
Creates an OutputStream to write the log message into.
- Parameters:
direction- direction used for filename.transportType- the transport protocol used i.e.messageType- the type of the message i.e.communicationContext- communication information such as target address and port.- Returns:
an output stream to write the log message into.
-
logMessage
abstract InputStream logMessage(CommunicationLog.Direction direction, CommunicationLog.TransportType transportType, CommunicationLog.MessageType messageType, CommunicationContext communicationContext, InputStream message)
Logs a message based on an InputStream.
It blocks until everything has been read.
- Parameters:
direction- direction used for filename.transportType- the transport protocol used i.e.messageType- the type of the message i.e.communicationContext- communication information such as target address and portmessage- the message to log as input stream.- Returns:
a new input stream that mirrors the data from the message input data.
-
-
-
-