Package com.sun.corba.ee.impl.transport
Class MessageTraceManagerImpl
- java.lang.Object
-
- com.sun.corba.ee.impl.transport.MessageTraceManagerImpl
-
- All Implemented Interfaces:
MessageTraceManager
public class MessageTraceManagerImpl extends java.lang.Object implements MessageTraceManager
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ListdataReceivedprivate java.util.ListdataSentprivate booleanenabledprivate byte[]headerprivate booleanRHRCalled
-
Constructor Summary
Constructors Constructor Description MessageTraceManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Discard all messages accumulated since the last call to clear.voidenable(boolean flag)Called with flag=true to enable capture of messages.byte[]getBytes(java.nio.ByteBuffer bb, int offset)Return the contents of the byte buffer.byte[][]getDataReceived()Return an array of messages (represented as byte[]) for the message(s) received since the last call to clear().byte[][]getDataSent()Return an array of messages (represented as byte[]) for the message(s) sent on this thread since the last call to clear().private voidinit()private voidinitHeaderRecorder()booleanisEnabled()Returns true if messages are to be captured on this thread, otherwise false.voidrecordBodyReceived(java.nio.ByteBuffer message)voidrecordDataSent(java.nio.ByteBuffer message)voidrecordHeaderReceived(java.nio.ByteBuffer message)
-
-
-
Method Detail
-
clear
public void clear()
Description copied from interface:MessageTraceManagerDiscard all messages accumulated since the last call to clear.- Specified by:
clearin interfaceMessageTraceManager
-
init
private void init()
-
isEnabled
public boolean isEnabled()
Description copied from interface:MessageTraceManagerReturns true if messages are to be captured on this thread, otherwise false.- Specified by:
isEnabledin interfaceMessageTraceManager- Returns:
- if messages are captured
-
enable
public void enable(boolean flag)
Description copied from interface:MessageTraceManagerCalled with flag=true to enable capture of messages.- Specified by:
enablein interfaceMessageTraceManager- Parameters:
flag- enable capture
-
getDataSent
public byte[][] getDataSent()
Description copied from interface:MessageTraceManagerReturn an array of messages (represented as byte[]) for the message(s) sent on this thread since the last call to clear(). If there is a Location Forward in this invocation, the the data returned will include all requests sent starting with the first request.- Specified by:
getDataSentin interfaceMessageTraceManager- Returns:
- array of messages
-
getDataReceived
public byte[][] getDataReceived()
Description copied from interface:MessageTraceManagerReturn an array of messages (represented as byte[]) for the message(s) received since the last call to clear().- Specified by:
getDataReceivedin interfaceMessageTraceManager- Returns:
- messages received
-
initHeaderRecorder
private void initHeaderRecorder()
-
getBytes
public byte[] getBytes(java.nio.ByteBuffer bb, int offset)Return the contents of the byte buffer. The ByteBuffer is not modified. The result is written starting at index offset in the byte[].- Parameters:
bb- Buffer to read fromoffset- Offset to start from, must be non-negative- Returns:
- Contents of the buffer
-
recordDataSent
public void recordDataSent(java.nio.ByteBuffer message)
- Specified by:
recordDataSentin interfaceMessageTraceManager
-
recordHeaderReceived
public void recordHeaderReceived(java.nio.ByteBuffer message)
-
recordBodyReceived
public void recordBodyReceived(java.nio.ByteBuffer message)
-
-