This method registers the {@link #registerToplevelSecurityException(Class) top-level security exceptions}. You may
override it to add additional or other classes.
11656
protected void registerToplevelSecurityExceptions() {

    this.securityExceptions.add(SecurityException.class);
    this.securityExceptions.add(SecurityErrorUserException.class);
    registerToplevelSecurityExceptions("org.springframework.security.access.AccessDeniedException");
    registerToplevelSecurityExceptions("org.springframework.security.authentication.AuthenticationServiceException");
    registerToplevelSecurityExceptions(
        "org.springframework.security.authentication.AuthenticationCredentialsNotFoundException");
    registerToplevelSecurityExceptions("org.springframework.security.authentication.BadCredentialsException");
    registerToplevelSecurityExceptions("org.springframework.security.authentication.AccountExpiredException");
  }
725847
@Override
  public void register(final Identifier id, final InetSocketAddress addr) throws Exception {

    // needed to keep threads from reading the wrong response
    // TODO: better fix matches replies to threads with a map after REEF-198
    synchronized (this) {

      LOG.log(Level.FINE, "Register {0} : {1}", new Object[]{id, addr});

      final Link<NamingMessage> link = this.transport.open(
          this.serverSocketAddr, this.codec, new LoggingLinkListener<NamingMessage>());

      link.write(new NamingRegisterRequest(new NameAssignmentTuple(id, addr)));

      for (;;) {
        try {
          this.replyQueue.poll(this.timeout, TimeUnit.MILLISECONDS);
          break;
        } catch (final InterruptedException e) {
          LOG.log(Level.INFO, "Interrupted", e);
          throw new NamingException(e);
        }
      }
    }
  }
351728
public <T extends CommandOutput<?, ?, ?>> void register(Class<T> commandOutputClass,
            CommandOutputFactory commandOutputFactory) {

        LettuceAssert.notNull(commandOutputClass, "CommandOutput class must not be null");
        LettuceAssert.notNull(commandOutputFactory, "CommandOutputFactory must not be null");

        register(registry, commandOutputClass, commandOutputFactory);
    }
782943
public static void register() {
        if (Main.isUnitTest && JENKINS_LOC == null) {
            mockOff();
            return;
        }
        ClassFilter.setDefault(new ClassFilterImpl());
        if (SUPPRESS_ALL) {
            LOGGER.warning("All class filtering suppressed. Your Jenkins installation is at risk from known attacks. See https://jenkins.io/redirect/class-filter/");
        } else if (SUPPRESS_WHITELIST) {
            LOGGER.warning("JEP-200 class filtering by whitelist suppressed. Your Jenkins installation may be at risk. See https://jenkins.io/redirect/class-filter/");
        }
    }
365035
protected function registerExceptionHandler()
    {
        $this->exceptionHandler = ExceptionHandler::register(true);
        $this->exceptionHandler->setDisplayer($this->displayer);
    }
1078990
public <TMessage> void register(final Class<TMessage> msgMetaClass) {
    final String classId = getClassId(msgMetaClass);
    LOG.log(Level.INFO, "Registering message: {0}", classId);
    this.nameToSerializerMap.put(classId, SerializationFactory.createSerializer(msgMetaClass));
    this.nameToDeserializerMap.put(classId, SerializationFactory.createDeserializer(msgMetaClass));
  }
1329826
private void configureSecurity(ServletContextHandler context, String realmName, String authMethod,
								   String formLoginPage, String formErrorPage) {
		final SecurityHandler securityHandler = context.getSecurityHandler();

		Authenticator authenticator = null;
		if (authMethod == null) {
			LOG.warn("UNKNOWN AUTH METHOD: " + authMethod);
		} else {
			switch (authMethod) {
				case Constraint.__FORM_AUTH:
					authenticator = new FormAuthenticator();
					securityHandler.setInitParameter(FormAuthenticator.__FORM_LOGIN_PAGE, formLoginPage);
					securityHandler.setInitParameter(FormAuthenticator.__FORM_ERROR_PAGE, formErrorPage);
					break;
				case Constraint.__BASIC_AUTH:
					authenticator = new BasicAuthenticator();
					break;
				case Constraint.__DIGEST_AUTH:
					authenticator = new DigestAuthenticator();
					break;
				case Constraint.__CERT_AUTH:
					authenticator = new ClientCertAuthenticator();
					break;
				case Constraint.__CERT_AUTH2:
					authenticator = new ClientCertAuthenticator();
					break;
				case Constraint.__SPNEGO_AUTH:
					authenticator = new SpnegoAuthenticator();
					break;
				default:
					authenticator = getAuthenticator(authMethod);
					break;
			}
		}

		securityHandler.setAuthenticator(authenticator);

		securityHandler.setRealmName(realmName);

	}
742840
protected function registerSecurity()
    {
        $this->app->singleton('security', function (Container $app) {
            $evil = $app->config->get('security.evil');

            return new Security($evil);
        });

        $this->app->alias('security', Security::class);
    }
1232081
protected void registerServant()
    {
        if (ivRemoteObjectWrapper != null)
        {
            // synchronized on the remote Wrapper to set the isRemoteRegistered flag
            synchronized (ivRemoteObjectWrapper)
            {
                if (!isRemoteRegistered)
                {

                    try
                    {
                        if (!isZOS) // LIDB2775-23.9
                        {

                            // Servant registration must be performed with the application classloader
                            // in force.  This is especially needed for JITDeploy since
                            // the JIT pluggin will be on the application classloader.
                            // Without the JIT pluggin the classloader will not trigger
                            // JITDeploy to create the stub.  //d521388
                            Object originalLoader = ThreadContextAccessor.UNCHANGED;
                            try
                            {
                                if (ivBMD != null) // EJBFactories have no BMD d529446
                                {
                                    originalLoader = EJBThreadData.svThreadContextAccessor.pushContextClassLoaderForUnprivileged(ivBMD.classLoader); //PK83186

                                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                                    {
                                        if (originalLoader != ThreadContextAccessor.UNCHANGED)
                                        {
                                            Tr.debug(tc, "registerServant : old ClassLoader = " + originalLoader);
                                            Tr.debug(tc, "registerServant : new ClassLoader = " + ivBMD.classLoader);
                                        }
                                        else
                                        {
                                            Tr.debug(tc, "registerServant : current ClassLoader = " + ivBMD.classLoader);
                                        }
                                    }
                                }
                                ivRemoteObjectWrapper.container.getEJBRuntime().registerServant(ivRemoteObjectWrapper.beanId.getByteArray(), ivRemoteObjectWrapper);
                            } finally
                            {
                                EJBThreadData.svThreadContextAccessor.popContextClassLoaderForUnprivileged(originalLoader);
                            } // finally

                        } // if( !isZOS )

                        isRemoteRegistered = true;
                    } catch (Exception ex)
                    {
                        FFDCFilter.processException(ex, CLASS_NAME +
                                                        ".registerServant",
                                                    "184", this);
                        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                        {
                            Tr.event(tc, "Failed to register wrapper instance",
                                     new Object[] { ivRemoteObjectWrapper, ex });
                        }
                    }

                } // if ( !isRemoteRegistered )

            } // synchronized( ivRemoteObject )

        } // if ( ivRemoteObject != null )

    }
214298
public static void enableSSLValidation() {
    try {
      SSLContext.getInstance("SSL").init(null, null, null);
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
274405
public void register(BundleContext bndCtx) {
        final String methodName = "register()";
        final boolean trace = TraceComponent.isAnyTracingEnabled();
        if (trace && tc.isEntryEnabled())
            Tr.entry(tc, methodName, this);
        Hashtable<String, String> props = new Hashtable<String, String>();
        props.put("jmx.objectname", this.obn.toString());

        if (IS_DEBUGGING)
            // Extra Check: Does this MBean exist already?
            MBeanHelper.isMbeanExist(objectName.toString() + "*", className, methodName);

        // Register the MBean
        if (trace && tc.isDebugEnabled())
            Tr.debug(tc, "activateMBean started for " + this.obn.toString());
        this.reg = bndCtx.registerService(JCAConnectionFactoryMBeanImpl.class.getName(), this, props);
        if (trace && tc.isEntryEnabled())
            Tr.exit(tc, methodName, this);
    }
773987
@Override
    public void registerStoppableAsynchConsumerCallback(
                                                        StoppableAsynchConsumerCallback callback,
                                                        int maxActiveMessages,
                                                        long messageLockExpiry,
                                                        int maxBatchSize,
                                                        Reliability unrecoverableReliability,
                                                        boolean inLine,
                                                        OrderingContext extendedMessageOrderingContext,
                                                        int maxSequentialFailures,
                                                        long hiddenMessageDelay)
                    throws SISessionUnavailableException, SISessionDroppedException, SIIncorrectCallException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "registerStoppableAsynchConsumerCallback",
                        new Object[] { callback,
                                      maxActiveMessages,
                                      messageLockExpiry,
                                      maxBatchSize,
                                      unrecoverableReliability,
                                      inLine,
                                      extendedMessageOrderingContext,
                                      maxSequentialFailures,
                                      hiddenMessageDelay });

        //register the AsynchConsumer with the LCP
        _localConsumerPoint.registerStoppableAsynchConsumer(
                                                            callback,
                                                            maxActiveMessages,
                                                            messageLockExpiry,
                                                            maxBatchSize,
                                                            unrecoverableReliability,
                                                            inLine,
                                                            (OrderingContextImpl) extendedMessageOrderingContext,
                                                            null, // No callback busy lock is used for non-mediation consumers.
                                                            maxSequentialFailures,
                                                            hiddenMessageDelay);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "registerStoppableAsynchConsumerCallback");
    }
943694
static void register(Class<? extends URLStreamHandler> handlerClass) {
    checkArgument("Handler".equals(handlerClass.getSimpleName()));

    String pkg = handlerClass.getPackage().getName();
    int lastDot = pkg.lastIndexOf('.');
    checkArgument(lastDot > 0, "package for Handler (%s) must have a parent package", pkg);

    String parentPackage = pkg.substring(0, lastDot);

    String packages = System.getProperty(JAVA_PROTOCOL_HANDLER_PACKAGES);
    if (packages == null) {
      packages = parentPackage;
    } else {
      packages += "|" + parentPackage;
    }
    System.setProperty(JAVA_PROTOCOL_HANDLER_PACKAGES, packages);
  }
991249
public <T> void register(String subjectName,
                                   SubjectObserver<T> subjectObserver,
                                   Subject<T> subject)
   {
      subject.add(subjectObserver);
      
      this.registry.put(subjectName, subject);
   }
767799
public static function register()
    {
        ini_set('unserialize_callback_func', 'spl_autoload_call');

        if (false === spl_autoload_register(array(self::getInstance(), 'autoload'))) {
            throw new Exception(sprintf('Unable to register %s::autoload as an autoloading method.', get_class(self::getInstance())));
        }
    }
772064
protected void registerForMBeanNotifications() {
        Set<MBeanServerConnection> servers = getMBeanServers();
        Exception lastExp = null;
        StringBuilder errors = new StringBuilder();
        for (MBeanServerConnection server : servers) {
            try {
                JmxUtil.addMBeanRegistrationListener(server,this,null);
            } catch (IllegalStateException e) {
                lastExp = updateErrorMsg(errors,e);
            }
        }
        if (lastExp != null) {
            throw new IllegalStateException(errors.substring(0,errors.length()-1),lastExp);
        }
    }
223381
protected static synchronized void registerAllowedParentClass(Class<? extends ElementBase> clazz,
                                                                  Class<? extends ElementBase> parentClass) {
        allowedParentClasses.addCardinality(clazz, parentClass, 1);
    }