Examples of RegistrationContext


Examples of javax.security.auth.message.config.AuthConfigFactory.RegistrationContext

        RegistrationContext ctx) {
       
        this.className = className;
        this.properties = properties;
        if (ctx != null) {
            RegistrationContext ctxImpl =
                new RegistrationContextImpl(ctx.getMessageLayer(),
                ctx.getAppContext(), ctx.getDescription(), ctx.isPersistent());
            List<RegistrationContext> newList =
                new ArrayList<RegistrationContext>(1);
            newList.add(ctxImpl);
View Full Code Here

Examples of javax.security.auth.message.config.AuthConfigFactory.RegistrationContext

            }

            Iterator<RegistrationContext> iter =
                    info.getRegContexts().iterator();
            while (iter.hasNext()) {
                RegistrationContext ctx = iter.next();
                if (ctx.equals(target)) {
                    iter.remove();
                    retValue = true;
                }
            }
        }
View Full Code Here

Examples of javax.security.auth.message.config.AuthConfigFactory.RegistrationContext

    public boolean equals(Object o) {
        if (o == null || !(o instanceof RegistrationContext)) {
            return false;
        }
        RegistrationContext target = (RegistrationContext) o;
        return ( EntryInfo.matchStrings(
            messageLayer, target.getMessageLayer()) &&
            EntryInfo.matchStrings(appContext, target.getAppContext()) &&
            EntryInfo.matchStrings(description, target.getDescription()) );
    }
View Full Code Here

Examples of javax.security.auth.message.config.AuthConfigFactory.RegistrationContext

        RegistrationContext ctx) {

        this.className = className;
        this.properties = properties;
        if (ctx != null) {
            RegistrationContext ctxImpl =
                new RegistrationContextImpl(ctx.getMessageLayer(),
                ctx.getAppContext(), ctx.getDescription(), ctx.isPersistent());
            List<RegistrationContext> newList =
                new ArrayList<RegistrationContext>(1);
            newList.add(ctxImpl);
View Full Code Here

Examples of javax.security.auth.message.config.AuthConfigFactory.RegistrationContext

                }

                Iterator<RegistrationContext> iter =
                        info.getRegContexts().iterator();
                while (iter.hasNext()) {
                    RegistrationContext ctx = iter.next();
                    if (ctx.equals(target)) {
                        iter.remove();
                        if (info.getRegContexts().isEmpty()) {
                            lit.remove();
                        }
                        retValue = true;
View Full Code Here

Examples of javax.security.auth.message.config.AuthConfigFactory.RegistrationContext

    @Override
    public boolean equals(Object o) {
        if (o == null || !(o instanceof RegistrationContext)) {
            return false;
        }
        RegistrationContext target = (RegistrationContext) o;
        return ( EntryInfo.matchStrings(
            messageLayer, target.getMessageLayer()) &&
            EntryInfo.matchStrings(appContext, target.getAppContext()) &&
            isPersistent() == target.isPersistent() );
    }
View Full Code Here

Examples of javax.security.auth.message.config.AuthConfigFactory.RegistrationContext

            appContext = ALL_APPS;
        } else {
            appContext = id;
        }

        return new RegistrationContext() {

            final String description = "JAAS AuthConfig: " + appContext;

            public String getMessageLayer() {
                return layer;
View Full Code Here

Examples of javax.security.auth.message.config.AuthConfigFactory.RegistrationContext

                    HashSet<String> toBeUnregistered = new HashSet<String>();
                    // get the current self-registrations
                    String[] regID = getFactory().getRegistrationIDs(this);
                    for (String i : regID) {
                        if (selfRegistered.contains(i)) {
                            RegistrationContext c = getFactory().getRegistrationContext(i);
                            if (c != null && !c.isPersistent()) {
                                toBeUnregistered.add(i);
                            }
                        }
                    }
                    // remove self-registrations that already exist and should continue
                    for (String i : toBeUnregistered) {
                        RegistrationContext r = getFactory().getRegistrationContext(i);
                        for (int j = 0; j < contexts.length; j++) {
                            if (contextsAreEqual(contexts[j], r)) {
                                toBeUnregistered.remove(i);
                                contexts[j] = null;
                            }
                        }
                    }
                    // unregister those that should not continue to exist
                    for (String i : toBeUnregistered) {
                        selfRegistered.remove(i);
                        getFactory().removeRegistration(i);
                    }
                }
                // add new self-segistrations
                for (RegistrationContext r : contexts) {
                    if (r != null) {
                        String id = getFactory().registerConfigProvider(this,
                                r.getMessageLayer(), r.getAppContext(),
                                r.getDescription());
                        selfRegistered.add(id);
                    }
                }
            } finally {
                wLock.unlock();
View Full Code Here

Examples of javax.security.auth.message.config.AuthConfigFactory.RegistrationContext

    public void oldRefresh() {
        if (getFactory() != null) {
            String[] regID = getFactory().getRegistrationIDs(this);
            for (String i : regID) {
                if (selfRegistered.contains(i)) {
                    RegistrationContext c = getFactory().getRegistrationContext(i);
                    if (c != null && !c.isPersistent()) {
                        getFactory().removeRegistration(i);
                    }
                }
            }
        }
View Full Code Here

Examples of javax.security.auth.message.config.AuthConfigFactory.RegistrationContext

      if(st.countTokens() < 2)
         throw new IllegalStateException("Invalid key obtained="+key);
      final String layer = st.nextToken();
      final String appCtx = st.nextToken();
     
      return new RegistrationContext()
      {
         public String getAppContext()
         {
            return appCtx.equals("NULL") ? null : appCtx;
         }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.