private void dumpInboundConversations ( final IncidentStream is ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "dumpInboundConversations" , is ) ; final List serverConvs = ServerTransportAcceptListener . getInstance ( ) . getActiveConversations ( ) ; is . writeLine ( "" , "" ) ; is . writeLine ( "\n------ Inbound Conversation Dump ------ " , ">" ) ; if ( serverConvs != null ) { // Build a map of connection -> conversation so that we can output the // connection information once per set of conversations. final Map < Object , LinkedList < Conversation > > connectionToConversationMap = new HashMap < Object , LinkedList < Conversation > > ( ) ; for ( final Iterator i = serverConvs . iterator ( ) ; i . hasNext ( ) ; ) { try { final Conversation c = ( Conversation ) i . next ( ) ; final Object connectionObject = c . getConnectionReference ( ) ; final LinkedList < Conversation > conversationList ; if ( ! connectionToConversationMap . containsKey ( connectionObject ) ) { conversationList = new LinkedList < Conversation > ( ) ; connectionToConversationMap . put ( connectionObject , conversationList ) ; } else { conversationList = connectionToConversationMap . get ( connectionObject ) ; } conversationList . add ( c ) ; } catch ( Throwable t ) { // No FFDC Code Needed is . writeLine ( "\nUnable to dump conversation" , t ) ; } } // Go through the map and dump out a connection - followed by its conversations final Set < Map . Entry < Object , LinkedList < Conversation > > > entries = connectionToConversationMap . entrySet ( ) ; for ( final Map . Entry < Object , LinkedList < Conversation > > entry : entries ) { final Object connectionObject = entry . getKey ( ) ; is . writeLine ( "\nInbound connection:" , connectionObject ) ; final LinkedList < Conversation > conversationList = entry . getValue ( ) ; while ( ! conversationList . isEmpty ( ) ) { final Conversation c = conversationList . removeFirst ( ) ; is . writeLine ( "\nInbound Conversation[" + c . getId ( ) + "]: " , c . getFullSummary ( ) ) ; try { dumpServerConversation ( is , c ) ; } catch ( Throwable t ) { // No FFDC Code Needed is . writeLine ( "\nUnable to dump conversation" , t ) ; } } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "dumpInboundConversations" ) ; }
This method dumps the status of any inbound conversations that are currently active . It does this by asking the accept listeners for their list of active conversations and dumping out the details in their conversation states .