private void processEvent(CommsByteBuffer buffer, Conversation conversation)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "processEvent",
                                           new Object[]
                                           {
                                              buffer,
                                              conversation
                                           });

      buffer.getShort();                                      // BIT16 ConnectionObjectID
      short eventId = buffer.getShort();                      // BIT16 Event ID

      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Event Id", ""+eventId);

      // Now switch on the event Id
      if (eventId == CommsConstants.EVENTID_ME_QUIESCING ||
          eventId == CommsConstants.EVENTID_ME_TERMINATED)
      {
         if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Received an ME event");
         ClientAsynchEventThreadPool.getInstance().dispatchAsynchEvent(eventId, conversation);
      }
      // Async exception
      else if(eventId == CommsConstants.EVENTID_ASYNC_EXCEPTION)
      {
         if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Received an Async exception event");

         short clientSessionId = buffer.getShort();
         // Get the exception type and rebuild the correct one
         Exception exception = buffer.getException(conversation);

         // Now pass the info off to the proxy queue

         // Get the conversation state and the get the proxy group from it
         ProxyQueueConversationGroup pqcg = ((ClientConversationState) conversation.getAttachment()).getProxyQueueConversationGroup();
         // If this is null, something has gone wrong here
         if (pqcg == null)
         {
            SIErrorException e = new SIErrorException(
               nls.getFormattedMessage("NO_PROXY_CONV_GROUP_SICO1011", null, null)
            );

            FFDCFilter.processException(e, CLASS_NAME + ".processEvent",
                                        CommsConstants.PROXYRECEIVELISTENER_PROCESSEVENT_01, this);

            SibTr.error(tc, "NO_PROXY_CONV_GROUP_SICO1011", e);

            throw e;
         }
         // Otherwise get the proxy queue
         ProxyQueue proxyQueue = pqcg.find(clientSessionId);
         if (proxyQueue == null)
         {
            SIErrorException e = new SIErrorException(
               nls.getFormattedMessage("UNABLE_TO_FIND_PROXY_QUEUE_SICO1012", null, null)
            );

            FFDCFilter.processException(e, CLASS_NAME + ".processEvent",
                                        CommsConstants.PROXYRECEIVELISTENER_PROCESSEVENT_02, this);

            SibTr.error(tc, "UNABLE_TO_FIND_PROXY_QUEUE_SICO1012", e);

            throw e;
         }

         ClientAsynchEventThreadPool.getInstance().dispatchAsynchException(proxyQueue, exception);
      }

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "processEvent");
   }
private void processEvent ( CommsByteBuffer buffer , Conversation conversation ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "processEvent" , new Object [ ] { buffer , conversation } ) ; buffer . getShort ( ) ; short eventId = buffer . getShort ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Event Id" , "" + eventId ) ; if ( eventId == CommsConstants . EVENTID_ME_QUIESCING || eventId == CommsConstants . EVENTID_ME_TERMINATED ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Received an ME event" ) ; ClientAsynchEventThreadPool . getInstance ( ) . dispatchAsynchEvent ( eventId , conversation ) ; } else if ( eventId == CommsConstants . EVENTID_ASYNC_EXCEPTION ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Received an Async exception event" ) ; short clientSessionId = buffer . getShort ( ) ; Exception exception = buffer . getException ( conversation ) ; ProxyQueueConversationGroup pqcg = ( ( ClientConversationState ) conversation . getAttachment ( ) ) . getProxyQueueConversationGroup ( ) ; if ( pqcg == null ) { SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "NO_PROXY_CONV_GROUP_SICO1011" , null , null ) ) ; FFDCFilter . processException ( e , CLASS_NAME + ".processEvent" , CommsConstants . PROXYRECEIVELISTENER_PROCESSEVENT_01 , this ) ; SibTr . error ( tc , "NO_PROXY_CONV_GROUP_SICO1011" , e ) ; throw e ; } ProxyQueue proxyQueue = pqcg . find ( clientSessionId ) ; if ( proxyQueue == null ) { SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "UNABLE_TO_FIND_PROXY_QUEUE_SICO1012" , null , null ) ) ; FFDCFilter . processException ( e , CLASS_NAME + ".processEvent" , CommsConstants . PROXYRECEIVELISTENER_PROCESSEVENT_02 , this ) ; SibTr . error ( tc , "UNABLE_TO_FIND_PROXY_QUEUE_SICO1012" , e ) ; throw e ; } ClientAsynchEventThreadPool . getInstance ( ) . dispatchAsynchException ( proxyQueue , exception ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "processEvent" ) ; }
This method will process a connection event message received from the server.
<p>
The format of this message is as follows:
<p>
BIT16 ConnectionObjectID
BIT16 EventID
<p>
The event ID that we are currently trapping for is:
<ul>
<li>0x0000  -  (Used internally to invoke comms exception on the listener)
<li>0x0002  -  ME Quiescing
<li>0x0004  -  Async Exception
<ul>
<p>
For the async exception, the following additional data is flowed from the server:
<p>
BIT16 ClientSessionId (proxy queue Id)
BIT16 ExceptionId
BIT16 DataId
BIT16 Data length
BYTE[] Data

@param buffer
@param conversation