响应 token 通知。

@param context
@param token
@param bundle
331065
@Override
  public void onToken(Context context, String token, Bundle bundle) {
    updateAVInstallation(token);
  }
224
@Override
    protected void doCommonFilter(PortletRequest request, PortletResponse response,
            javax.portlet.filter.FilterChain chain) throws IOException, PortletException {

        if (logger.isDebugEnabled()) {
            logger.debug("Checking secure context token: " + SecurityContextHolder.getContext().getAuthentication());
        }

        if (requiresAuthentication((PortletRequest) request)) {
            doAuthenticate((PortletRequest) request, (PortletResponse) response);
        }

        PortletFilterUtils.doFilter(request, response, chain);
    }
341718
protected void sequence_UntilToken(ISerializationContext context, UntilToken semanticObject) {
		if (errorAcceptor != null) {
			if (transientValues.isValueTransient(semanticObject, XtextPackage.Literals.ABSTRACT_NEGATED_TOKEN__TERMINAL) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, XtextPackage.Literals.ABSTRACT_NEGATED_TOKEN__TERMINAL));
		}
		SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
		feeder.accept(grammarAccess.getUntilTokenAccess().getTerminalTerminalTokenElementParserRuleCall_1_0(), semanticObject.getTerminal());
		feeder.finish();
	}
513599
private static BundleContext checkBundleContext() {
        if (bundleContext == null) {
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, "BundleContext is null and should not be");
            }
        }
        return bundleContext;
    }
317036
@Override
    protected void retrieveBundleContext() {

        BundleContext bc = TxBundleTools.getBundleContext();
        if (tc.isDebugEnabled())
            Tr.debug(tc, "retrieveBundleContext from TxBundleTools, bc " + bc);
        if (bc == null) {
            bc = EmbeddableTxBundleTools.getBundleContext();
            if (tc.isDebugEnabled())
                Tr.debug(tc, "retrieveBundleContext from EmbeddableTxBundleTools, bc " + bc);
        }
        _bc = bc;
    }
1167566
public void startBundle(Bundle bundle)
    {
        if (bundle != null)
            if ((bundle.getState() != Bundle.ACTIVE) && (bundle.getState() != Bundle.STARTING))
        {
            try {
                bundle.start();
            } catch (BundleException e) {
                e.printStackTrace();
            }
        }
    }
1264600
protected void activate(Map<String, Object> properties, ComponentContext context) {

        sslOptions.activate(context);
        sslFactoryProvider.activate(context);

        wsocChain.init(WS_CHAIN_NAME, chfw.getFramework());
        wsocSecureChain.init(WSS_CHAIN_NAME, chfw.getFramework());

        modified(properties);

    }
431550
void dispatch(final SibRaMessageToken token, final Map context) {

        final String methodName = "dispatch";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName,
                    new Object[] { token, context });
        }

        SibRaMessagingEngineConnection connection = null;
        BifurcatedConsumerSession session = null;
        SibRaDispatcher dispatcher = null;
        try {

            /*
             * Obtain connection to messaging engine
             */

            connection = getConnection(token.getBusName(), token.getMeUuid());

            /*
             * Obtain bifurcated consumer session
             */

            synchronized (_sessionsByMeUuid) {

                Map sessionsById = (Map) _sessionsByMeUuid.get(token
                        .getMeUuid());

                if (sessionsById == null) {

                    sessionsById = new HashMap();
                    _sessionsByMeUuid.put(token.getMeUuid(), sessionsById);

                }

                session = (BifurcatedConsumerSession) sessionsById
                        .get(Long.valueOf(token.getSessionId()));

                if (session == null) {

                    /*
                     * Create a new bifurcated consumer session
                     */

                    session = connection.getConnection()
                            .createBifurcatedConsumerSession(
                                    token.getSessionId());
                    sessionsById.put(Long.valueOf(token.getSessionId()), session);

                }

            }

            /**
             * Create the first dispatcher
             */
            if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) SibTr.debug(TRACE, "creating dispatcher for: " + _j2eeName);
            dispatcher = connection.createDispatcher(session, Reliability.getReliability(token.getUnrecoveredReliability()), token.getMaxFailedDeliveries(), token.getSequentialMessageThreshold());

            /*
             * Get the array of message ids
             */
            SIMessageHandle [] msgHandles = token.getMessageHandleArray();
            SIBusMessage [] messages = null;

            /**
             * If we are a non transactional MDB then
             * - If we can delete the messages when they are read then perform a readAndDeleteSet
             * - If the messages should be kept (the message has a higher reliability than unrecovered reliability
             * defined on the session) then just perform a read set.
             * For transactional MDBs do not read the messages yet. This will be done in the dispatcher's
             * dispatch code after a transaction has been started so that the readAndDelete can be performed
             * under this transaction.
             */
            if ((dispatcher instanceof SibRaNonTransactionalDispatcher) && (messages == null)) {
              if (token.isDeleteMessagesWhenRead()) {

                  if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled ()) {
                    SibTr.debug(this, TRACE,
                        "These messages will be deleted when read " + Arrays.toString(token.getMessageHandleArray ()));
                  }

                  messages = session.readAndDeleteSet(token.getMessageHandleArray (), null); // For messages that are being deleted

              } else {

                  if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled ()) {
                    SibTr.debug(this, TRACE,
                        "These messages will be read but not deleted yet " + Arrays.toString(token.getMessageHandleArray ()));
                  }

                  messages = session.readSet (token.getMessageHandleArray ()); // For messages that are not being deleted

              }

            }

            if ((msgHandles != null) && (msgHandles.length > 0)) {

                for (int i = 0; i < msgHandles.length; i++) {

                  /**
                   * Create a new dispatcher if we need one.
                   */
                  if (dispatcher == null) {
                        dispatcher = connection.createDispatcher(session, Reliability.getReliability(token.getUnrecoveredReliability()), token.getMaxFailedDeliveries(), token.getSequentialMessageThreshold());
                  }

                    dispatcher.dispatch(msgHandles[i], messages == null ? null : messages [i], context);

                    // Close the dispatcher and create a new one.
                    connection.closeDispatcher(dispatcher);
                    dispatcher = null;

                }
            } else {

                SibTr.error(TRACE, "READ_SET_CWSIV1051", new Object[] {
                        Long.valueOf(token.getSessionId()), token.getMeUuid(),
                        Arrays.deepToString (msgHandles), token.getJ2EEName() });

            }

        } catch (final SISessionUnavailableException exception) {

            // No FFDC code needed

            /*
             * Session has been closed by listener and message will have been
             * unlocked
             */

            if (TraceComponent.isAnyTracingEnabled() && TRACE.isEventEnabled()) {
                SibTr.exception(this, TRACE, exception);
            }

        }
        catch (final SIMessageNotLockedException exception) {

            // No FFDC code needed

            /*
             * Message lock has expired and message will be reassigned
             */

            if (TraceComponent.isAnyTracingEnabled() && TRACE.isEventEnabled()) {
                SibTr.exception(this, TRACE, exception);
            }

        }
    catch (SIRollbackException exception) {

            FFDCFilter.processException(exception, CLASS_NAME + "."
                    + methodName, "1:348:1.19", this);
            SibTr.warning(TRACE, "EXCEPTION_CWSIV1052", new Object[] {
                    Long.valueOf(token.getSessionId()), token.getMeUuid(),
                    Arrays.deepToString(token.getMessageHandleArray()), exception });

        } catch (final Exception exception) {

            FFDCFilter.processException(exception, CLASS_NAME + "."
                    + methodName, "1:356:1.19", this);
            SibTr.warning(TRACE, "EXCEPTION_CWSIV1052", new Object[] {
                    Long.valueOf(token.getSessionId()), token.getMeUuid(),
                    Arrays.deepToString(token.getMessageHandleArray()), exception });

            /*
             * Close the dispatcher before closing the connection (if the connection is 
             * closed while a dispatcher is open the closeConnection will just hang waiting
             * for the last dispatcher to be closed).
             */
            if (dispatcher != null) {
                connection.closeDispatcher(dispatcher);
            }

            // 255651: Close the connection to the ME if an unknown error occurs
            // to flush the connection and force a new one to be created
            closeConnection(token.getMeUuid(), false);

            // null out the disptacher so we don't try and close it again.
            dispatcher = null;

        } finally {

            /*
             * Close the dispatcher if its not already been closed
             */

            if (dispatcher != null) {
                connection.closeDispatcher(dispatcher);
            }

        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName);
        }

    }
633855
@Override
	public void start(BundleContext context) throws Exception {
		final String sourceMethod = "start"; //$NON-NLS-1$
		boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(Activator.class.getName(), sourceMethod, new Object[]{context});
		}
		super.start(context);

		// Verify the bundle id.
		if (!context.getBundle().getSymbolicName().equals(BUNDLE_NAME)) {
			throw new IllegalStateException();
		}
		serviceRegistrations = new LinkedList<ServiceRegistration<?>>();
		Activator.context = context;
		Dictionary<String, String> dict = new Hashtable<String, String>();
		dict.put("name", BUNDLE_NAME); //$NON-NLS-1$

		ServiceRegistration<?> commandProviderReg = registerCommandProvider();
		if (commandProviderReg != null) {
			serviceRegistrations.add(commandProviderReg);
		}
		// Create the executors provider.  The executors provider is created by the
		// activator primarily to allow executors to be shared by all of the
		// aggregators created by this bundle.
		dict = new Hashtable<String, String>();
		dict.put("name", BUNDLE_NAME); //$NON-NLS-1$
		executors = newExecutors();
		serviceRegistrations.add(
				context.registerService(IExecutors.class.getName(), executors, dict));

		if (isTraceLogging) {
			log.exiting(Activator.class.getName(), sourceMethod);
		}
	}
1031964
public static <T> void bindArguments(T target, Bundle bundle) {
        @SuppressWarnings("unchecked")
        BundleBinding<T> binding = (BundleBinding<T>) getBundleBinding(target.getClass().getClassLoader(), target.getClass());
        if (binding != null) {
            binding.bindArguments(target, bundle);
        }
    }
1263256
@Override
    public void visitToken(DetailAST token) {
        // Failed to load ServiceClient's class, don't validate anything.
        if (this.serviceClientClass == null) {
            return;
        }

        switch (token.getType()) {
            case TokenTypes.PACKAGE_DEF:
                this.extendsServiceClient = extendsServiceClient(token);
                break;
            case TokenTypes.CTOR_DEF:
                if (this.extendsServiceClient && visibilityIsPublicOrProtected(token)) {
                    log(token, CONSTRUCTOR_ERROR_MESSAGE);
                }
                break;
            case TokenTypes.METHOD_DEF:
                if (this.extendsServiceClient && !this.hasStaticBuilder && methodIsStaticBuilder(token)) {
                    this.hasStaticBuilder = true;
                }
                break;
        }
    }
335967
@Override
    public void start(BundleContext context) {

        initialContextFactories = initServiceTracker(context, InitialContextFactory.class, ServiceTrackerCustomizers.ICF_CACHE);
        objectFactories = initServiceTracker(context, ObjectFactory.class, ServiceTrackerCustomizers.URL_FACTORY_CACHE);
        icfBuilders = initServiceTracker(context, InitialContextFactoryBuilder.class, ServiceTrackerCustomizers.LAZY);
        urlObjectFactoryFinders = initServiceTracker(context, URLObjectFactoryFinder.class, ServiceTrackerCustomizers.LAZY);
        environmentAugmentors = initServiceTracker(context, EnvironmentAugmentation.class, null);
        environmentUnaugmentors = initServiceTracker(context, EnvironmentUnaugmentation.class, null);

        try {
            OSGiInitialContextFactoryBuilder builder = new OSGiInitialContextFactoryBuilder();
            setField(InitialContextFactoryBuilder.class, builder, true);
            icfBuilder = builder;
        } catch (IllegalStateException e) {
            // Log the problem at info level, but only log the exception at debug level, as in many cases this is not a real issue and people
            // don't want to see stack traces at info level when everything it working as expected.
            LOGGER.info(Utils.MESSAGES.getMessage("unable.to.set.static.ICFB.already.exists", getClassName(InitialContextFactoryBuilder.class)));
            LOGGER.debug(Utils.MESSAGES.getMessage("unable.to.set.static.ICFB.already.exists", getClassName(InitialContextFactoryBuilder.class)), e);
        }

        try {
            OSGiObjectFactoryBuilder builder = new OSGiObjectFactoryBuilder(context);
            setField(ObjectFactoryBuilder.class, builder, true);
            ofBuilder = builder;
        } catch (IllegalStateException e) {
            // Log the problem at info level, but only log the exception at debug level, as in many cases this is not a real issue and people
            // don't want to see stack traces at info level when everything it working as expected.
            LOGGER.info(Utils.MESSAGES.getMessage("unable.to.set.static.OFB.already.exists", getClassName(ObjectFactoryBuilder.class)));
            LOGGER.debug(Utils.MESSAGES.getMessage("unable.to.set.static.OFB.already.exists", getClassName(ObjectFactoryBuilder.class)), e);
        }

        context.registerService(JNDIProviderAdmin.class.getName(),
                                new ProviderAdminServiceFactory(context),
                                null);

        context.registerService(InitialContextFactoryBuilder.class.getName(),
                                new JREInitialContextFactoryBuilder(),
                                null);

        context.registerService(JNDIContextManager.class.getName(),
                                new ContextManagerServiceFactory(),
                                null);

        context.registerService(AugmenterInvoker.class.getName(),
                                AugmenterInvokerImpl.getInstance(),
                                null);

        //Start the bundletracker that clears out the cache. (only interested in stopping events)
        // bt = new BundleTracker(context, Bundle.STOPPING, new ServiceTrackerCustomizers.CacheBundleTrackerCustomizer());
        // bt.open();
    }
299257
public void eInit(XtendTypeDeclaration container, String name, IJvmTypeProvider context) {
		if (this.sarlAnnotationType == null) {
			this.container = container;
			this.sarlAnnotationType = SarlFactory.eINSTANCE.createSarlAnnotationType();
			container.getMembers().add(this.sarlAnnotationType);
			if (!Strings.isEmpty(name)) {
				this.sarlAnnotationType.setName(name);
			}
		}
	}
1043283
public void eInit(XtendTypeDeclaration container, IJvmTypeProvider context) {
		setTypeResolutionContext(context);
		if (this.sarlConstructor == null) {
			this.container = container;
			this.sarlConstructor = SarlFactory.eINSTANCE.createSarlConstructor();
			this.sarlConstructor.setAnnotationInfo(XtendFactory.eINSTANCE.createXtendMember());
			container.getMembers().add(this.sarlConstructor);
		}
	}
142999
protected static function rawblock(&$token, &$context) {
        $inner = $token[Token::POS_INNERTAG];
        trim($inner);

        // skip parse when inside raw block
        if ($context['rawblock'] && !(($token[Token::POS_BEGINRAW] === '{{') && ($token[Token::POS_OP] === '/') && ($context['rawblock'] === $inner))) {
            return true;
        }

        $token[Token::POS_INNERTAG] = $inner;

        // Handle raw block
        if ($token[Token::POS_BEGINRAW] === '{{') {
            if ($token[Token::POS_ENDRAW] !== '}}') {
                $context['error'][] = 'Bad token ' . Token::toString($token) . ' ! Do you mean ' . Token::toString($token, array(Token::POS_ENDRAW => '}}')) . ' ?';
            }
            if ($context['rawblock']) {
                Parser::setDelimiter($context);
                $context['rawblock'] = false;
            } else {
                if ($token[Token::POS_OP]) {
                    $context['error'][] = "Wrong raw block begin with " . Token::toString($token) . ' ! Remove "' . $token[Token::POS_OP] . '" to fix this issue.';
                }
                $context['rawblock'] = $token[Token::POS_INNERTAG];
                Parser::setDelimiter($context);
                $token[Token::POS_OP] = '#';
            }
            $token[Token::POS_ENDRAW] = '}}';
        }
    }
1309103
public static List<BundleModel> bundles(BundleContext context) {
        List<BundleModel> bundles = new ArrayList<>();
        for (Bundle bundle : context.getBundles()) {
            bundles.add(new BundleModel(bundle));
        }
        return bundles;
    }
323003
public void setToken(Token v) {
    if (Event_Type.featOkTst && ((Event_Type)jcasType).casFeat_token == null)
      jcasType.jcas.throwFeatMissing("token", "de.unihd.dbs.uima.types.heideltime.Event");
    jcasType.ll_cas.ll_setRefValue(addr, ((Event_Type)jcasType).casFeatCode_token, jcasType.ll_cas.ll_getFSRef(v));}