Method deregisterMonitor

Deregisters a previously registered callback.

@param callback
@throws SINotPossibleInCurrentConfigurationException
480277
public void deregisterMonitor(ConnectionImpl connection,
                                ConsumerSetChangeCallback callback)
  throws SINotPossibleInCurrentConfigurationException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.entry(
          tc,
          "deregisterMonitor",
          new Object[] { connection, callback});

    // Retrieve the callback from the index
    TopicRecord tRecord = retrieveCallbackFromConnectionIndex(connection, callback);

    if(tRecord != null)
    {
      // Have found the callback in the index, now remove the callback from
      // the appropriate registered monitors table.
      if(tRecord.isWildcarded)
      {
        removeCallbackFromRegisteredMonitors(callback,
                                             tRecord.topicExpression,
                                             true, // isWildcarded
                                             _registeredWildcardConsumerMonitors);
      }
      else
      {
        // Handle the non-wildcard case
        removeCallbackFromRegisteredMonitors(callback,
                                             tRecord.topicExpression,
                                             false, // isWildcarded
                                             _registeredExactConsumerMonitors);
      }
    }
    else
    {
      // Failed to find any reference to callback
      // Build the message for the Exception
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "deregisterMonitor", callback);

      SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0005",
        new Object[] {
          "com.ibm.ws.sib.processor.matching.ConsumerMonitorRegistrar",
          "1:237:1.10",
          callback });
      throw new SINotPossibleInCurrentConfigurationException(
        nls.getFormattedMessage(
          "INTERNAL_MESSAGING_ERROR_CWSIP0005",
          new Object[] {
            "com.ibm.ws.sib.processor.matching.ConsumerMonitorRegistrar",
            "1:244:1.10",
            callback },
          null));

    }

    // Now remove the callback from the index
    removeCallbackFromConnectionIndex(connection, callback);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "deregisterMonitor");
  }
725871
public static void callOnIsPrefetchChanged(
      @Nullable List<ProducerContextCallbacks> callbacks) {
    if (callbacks == null) {
      return;
    }
    for (ProducerContextCallbacks callback : callbacks) {
      callback.onIsPrefetchChanged();
    }
  }
662255
public void removeConsumerSetMonitors(ConnectionImpl connection)
  throws SINotPossibleInCurrentConfigurationException       
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "removeConsumerSetMonitors", new Object[] { connection });

    // Call the registrar
    _consumerMonitorRegistrar.removeConsumerSetMonitors(connection);

    if (tc.isEntryEnabled())
      SibTr.exit(tc, "removeConsumerSetMonitors");
  }
1334676
@Override
    public void registerDestructionCallback(String name, Runnable callback) {
        synchronized (this) {
            destructionCallbacks.put(name, callback);
        }
    }
219101
def deregister(self, event, fn):
        
        if event in self._handler_dict and fn in self._handler_dict[event]:
            self._handler_dict[event].remove(fn)
99939
public void deregister() {
		if(objectName == null) {
			return;
		}
		
		try {
			MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
			if (mbs.isRegistered(objectName)) {
				mbs.unregisterMBean(objectName);
			}
			objectName = null;
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}
851907
private void driveRegisteredCallbacks(
    RegisteredCallbacks rMonitor,
    boolean isEmpty)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.entry(
          tc,
          "driveRegisteredCallbacks",
          new Object[] { rMonitor, new Boolean(isEmpty) });

    // Get the list of callbacks
    ArrayList callbackList = rMonitor.getWrappedCallbacks();
    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
      SibTr.debug(tc, "Iterate over wrapped callbacks");
    // Iterate over the callbacks
    Iterator iter = callbackList.iterator();
    while (iter.hasNext())
    {
      WrappedConsumerSetChangeCallback wcb = (WrappedConsumerSetChangeCallback)iter.next();

      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        SibTr.debug(tc, "Drive callback: " + wcb.getCallback());

      // set the type of transition into the wrapped callback
      wcb.transitionEvent(isEmpty);

      try
      {
        //start up a new thread (from the MP's thread pool)
        //to drive the callback
        _messageProcessor.startNewThread(new AsynchThread(wcb));
      }
      catch (InterruptedException e)
      {
        // No FFDC code needed

        //Trace only
        SibTr.exception(tc, e);
      }
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "driveRegisteredCallbacks");

  }
95944
public void deregisterForEvents(SIMPMessage msg)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "deregisterForEvents");
      
    msg.deregisterMessageEventListener(MessageEvents.POST_COMMIT_REMOVE, this);
    msg.deregisterMessageEventListener(MessageEvents.POST_ROLLBACK_REMOVE, this);
    msg.deregisterMessageEventListener(MessageEvents.POST_COMMIT_ADD, this);
    msg.deregisterMessageEventListener(MessageEvents.POST_ROLLBACK_ADD, this);
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "deregisterForEvents");
  }
558755
def remove_callback(self, callback):
        """"""
        if callback in self._async_callbacks:
            self._async_callbacks.remove(callback)
1035622
@Override
    public void deregisterConsumerSetMonitor(
                                             ConsumerSetChangeCallback callback)
                    throws SINotPossibleInCurrentConfigurationException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(
                        tc,
                        "deregisterConsumerSetMonitor",
                        new Object[] { callback });

        _messageProcessor.
                        getMessageProcessorMatching().
                        deregisterConsumerSetMonitor(this, callback);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "deregisterConsumerSetMonitor");
    }
658659
public void deregister(CacheEntryListenerConfiguration<K, V> configuration) {
    requireNonNull(configuration);
    dispatchQueues.keySet().removeIf(registration ->
        configuration.equals(registration.getConfiguration()));
  }
125536
def dispatch(self, receiver):
        ''' 

        '''
        super(SessionCallbackRemoved, self).dispatch(receiver)
        if hasattr(receiver, '_session_callback_removed'):
            receiver._session_callback_removed(self)
1160777
public synchronized void deregisterSSLConfigChangeListener(SSLConfigChangeListener listener) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "deregisterSSLConfigChangeListener", new Object[] { listener });
        if (null == listener) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                Tr.exit(tc, "deregisterSSLConfigChangeListener");
            return;
        }

        SSLConfigChangeEvent event = null;

        if (sslConfigListenerEventMap.containsKey(listener))
            event = sslConfigListenerEventMap.get(listener);

        if (event != null) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(tc, "Removing listener: " + listener.getClass().getName());

            String alias = event.getAlias();
            if (sslConfigListenerMap.containsKey(alias)) {
                List<SSLConfigChangeListener> listenerList = sslConfigListenerMap.get(alias);
                if (listenerList != null) {
                    int index = listenerList.indexOf(listener);

                    if (index != -1)
                        listenerList.remove(index);
                }
            }

            sslConfigListenerEventMap.remove(listener);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "deregisterSSLConfigChangeListener");
    }
167487
public static void setCallbacks(
      @Nullable Drawable drawable,
      @Nullable Drawable.Callback callback,
      @Nullable TransformCallback transformCallback) {
    if (drawable != null) {
      drawable.setCallback(callback);
      if (drawable instanceof TransformAwareDrawable) {
        ((TransformAwareDrawable) drawable).setTransformCallback(transformCallback);
      }
    }
  }
1086607
public void registerCallback(C callback, CallbackOption<P> option)
	{
		callbacks.add(Pair.of(callback, option));
		callbacks = Ordering.natural()
							.reverse()
							.onResultOf(Priority::ordinal)
							.onResultOf(CallbackOption<P>::getPriority)
							.onResultOf(Pair<C, CallbackOption<P>>::getRight)
							.sortedCopy(callbacks);
	}
398159
public void unregisterCallback(UOWScopeCallback callback)
    {
        if (tc.isEntryEnabled()) Tr.entry(tc, "unregisterCallback", new Object[]{callback, this});
        
        _callbackManager.removeCallback(callback);
        
        if (tc.isEntryEnabled()) Tr.exit(tc, "unregisterCallback");
    }
563126
def remove_callback(self, callback):
        """"""
        if callback in self.callbacks:
            self.callbacks.remove(callback)