public void subscribeEvent(
    ConsumerDispatcherState subState,
    Transaction transaction)
    throws SIResourceException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(
        tc,
        "subscribeEvent",
        new Object[] { subState, transaction });

    try
    {
      // Get the lock Manager lock 
      // multiple subscribes can happen at the same time - 
      // this is allowed.
      _lockManager.lock();
      
      if (!_started)
      {      
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "subscribeEvent", "Returning as stopped");
        return;
      }

      // Get the list of Buses that this subscription needs to be forwarded
      // onto
      final BusGroup[] buses = _neighbours.getAllBuses();

      // Declaration of a message handler that can be used for 
      // building up the proxy subscription message to be forwarded.
      SubscriptionMessageHandler messageHandler = null;

      // Loop through each of the Buses deciding if this
      // subscription event needs to be forwarded
      if (!_reconciling)      
        for (int i = 0; i < buses.length; ++i)
        {
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            SibTr.debug(
              tc,
              "Forwarding topic " + subState.getTopic() + " to Bus " + buses[i]);
  
          // Send the proxy always
          messageHandler =
            buses[i].addLocalSubscription(
              subState,
              messageHandler,
              transaction,
              true);
          
          // If the subscription message isn't null, then add it back into 
          // the pool of subscription messages.
          if (messageHandler != null)
          {
            addMessageHandler(messageHandler);          
            messageHandler = null;
          }
        }
    }
    finally
    {
      // Release the lock that was obtained
      _lockManager.unlock();
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "subscribeEvent");
  }
public void subscribeEvent ( ConsumerDispatcherState subState , Transaction transaction ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "subscribeEvent" , new Object [ ] { subState , transaction } ) ; try { _lockManager . lock ( ) ; if ( ! _started ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "subscribeEvent" , "Returning as stopped" ) ; return ; } final BusGroup [ ] buses = _neighbours . getAllBuses ( ) ; SubscriptionMessageHandler messageHandler = null ; if ( ! _reconciling ) for ( int i = 0 ; i < buses . length ; ++ i ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Forwarding topic " + subState . getTopic ( ) + " to Bus " + buses [ i ] ) ; messageHandler = buses [ i ] . addLocalSubscription ( subState , messageHandler , transaction , true ) ; if ( messageHandler != null ) { addMessageHandler ( messageHandler ) ; messageHandler = null ; } } } finally { _lockManager . unlock ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "subscribeEvent" ) ; }
Forwards a subscription to all Neighbouring ME's

To drive this subscribeEvent method, the subscription would
have to have been registered on this ME which means that we
can forward this subscription onto the Neighbours if required

@param subState          The subscription definition
@param transaction       The transaction to send the proxy update
message under
@exception SIResourceException