Tabnine Logo
AuthConfigFactory$RegistrationContext.getAppContext
Code IndexAdd Tabnine to your IDE (free)

How to use
getAppContext
method
in
javax.security.auth.message.config.AuthConfigFactory$RegistrationContext

Best Java code snippets using javax.security.auth.message.config.AuthConfigFactory$RegistrationContext.getAppContext (Showing top 20 results out of 315)

origin: org.picketbox/picketbox

public boolean removeRegistration(String registrationID)
{
 if (registrationID == null)
   throw PicketBoxMessages.MESSAGES.invalidNullArgument("registrationID");
 RegistrationListener listener = this.keyToRegistrationListenerMap.get(registrationID);
 RegistrationContext rc = this.keyToRegistrationContextMap.get(registrationID);
 // remove the provider and notify listener of the change.
 boolean removed = (this.keyToAuthConfigProviderMap.remove(registrationID) != null);
 if (removed && listener != null)
   listener.notify(rc.getMessageLayer(), rc.getAppContext());
 this.keyToRegistrationContextMap.remove(registrationID);
 return removed;
}
origin: org.jboss.security/jbosssx-bare

  /**
  * @see AuthConfigFactory#removeRegistration(String)
  */
  public boolean removeRegistration(String registrationID)
  { 
   if(registrationID == null)
     throw new IllegalArgumentException("registrationID is null");
   
   String key = (String)idKeyMap.get(registrationID);
   if(key != null)
   {
     RegistrationListener listener = (RegistrationListener)this.keyListenerMap.get(key);
     RegistrationContext rc = this.getRegistrationContext(registrationID);
          this.keyProviderMap.remove(key);
     //Notify the listener of the change
     if(listener != null)
      listener.notify(rc.getMessageLayer(),rc.getAppContext()); 
     return true;
   }
   return false;
  } 
}
origin: org.glassfish.main.security/jaspic.provider.framework

private void writeRegEntry(EntryInfo info, PrintWriter out, int i) {
  out.println(INDENT[i++] + REG_ENTRY + " {");
  if (info.getClassName() != null) {
    writeConEntry(info, out, i);
  }
  for (RegistrationContext ctx : info.getRegContexts()) {
    out.println(INDENT[i++] + REG_CTX + " {");
    if (ctx.getMessageLayer() != null) {
      out.println(INDENT[i] + LAYER + SEP + ctx.getMessageLayer());
    }
    if (ctx.getAppContext() != null) {
      out.println(INDENT[i] + APP_CTX + SEP + ctx.getAppContext());
    }
    if (ctx.getDescription() != null) {
      out.println(INDENT[i] + DESCRIPTION +
        SEP + ctx.getDescription());
    }
    out.println(INDENT[--i] + "}");
  }
  out.println(INDENT[--i] + "}");
}
origin: org.glassfish.main.security/jaspic.provider.framework

if (r != null) {
  String id = getFactory().registerConfigProvider(this,
      r.getMessageLayer(), r.getAppContext(),
      r.getDescription());
  selfRegistered.add(id);
origin: eclipse-ee4j/glassfish

if (r != null) {
  String id = getFactory().registerConfigProvider(this,
      r.getMessageLayer(), r.getAppContext(),
      r.getDescription());
  selfRegistered.add(id);
origin: eclipse-ee4j/glassfish

protected void _loadFactory() {
  try {
    initializeMaps();
    List<EntryInfo> entryList = getRegStore().getPersistedEntries();
    for (EntryInfo info : entryList) {
      if (info.isConstructorEntry()) {
        _constructProvider(info.getClassName(),
            info.getProperties(), this);
      } else {
        boolean first = true;
        AuthConfigProvider p = null;
        List<RegistrationContext> contexts = (info.getRegContexts());
        for (RegistrationContext ctx : contexts) {
          if (first) {
            p = _constructProvider(info.getClassName(),
                info.getProperties(), null);
          }
          _loadRegistration(p, ctx.getMessageLayer(),
              ctx.getAppContext(), ctx.getDescription());
        }
      }
    }
  } catch (Exception e) {
    if (logger.isLoggable(Level.WARNING)) {
      logger.log(Level.WARNING,
          "jmac.factory_auth_config_loader_failure", e);
    }
  }
}
origin: org.glassfish.main.security/jaspic.provider.framework

protected void _loadFactory() {
  try {
    initializeMaps();
    List<EntryInfo> entryList = getRegStore().getPersistedEntries();
    for (EntryInfo info : entryList) {
      if (info.isConstructorEntry()) {
        _constructProvider(info.getClassName(),
            info.getProperties(), this);
      } else {
        boolean first = true;
        AuthConfigProvider p = null;
        List<RegistrationContext> contexts = (info.getRegContexts());
        for (RegistrationContext ctx : contexts) {
          if (first) {
            p = _constructProvider(info.getClassName(),
                info.getProperties(), null);
          }
          _loadRegistration(p, ctx.getMessageLayer(),
              ctx.getAppContext(), ctx.getDescription());
        }
      }
    }
  } catch (Exception e) {
    if (logger.isLoggable(Level.WARNING)) {
      logger.log(Level.WARNING,
          "jmac.factory_auth_config_loader_failure", e);
    }
  }
}
origin: eclipse-ee4j/glassfish

private void writeRegEntry(EntryInfo info, PrintWriter out, int i) {
  out.println(INDENT[i++] + REG_ENTRY + " {");
  if (info.getClassName() != null) {
    writeConEntry(info, out, i);
  }
  for (RegistrationContext ctx : info.getRegContexts()) {
    out.println(INDENT[i++] + REG_CTX + " {");
    if (ctx.getMessageLayer() != null) {
      out.println(INDENT[i] + LAYER + SEP + ctx.getMessageLayer());
    }
    if (ctx.getAppContext() != null) {
      out.println(INDENT[i] + APP_CTX + SEP + ctx.getAppContext());
    }
    if (ctx.getDescription() != null) {
      out.println(INDENT[i] + DESCRIPTION +
        SEP + ctx.getDescription());
    }
    out.println(INDENT[--i] + "}");
  }
  out.println(INDENT[--i] + "}");
}
origin: org.glassfish.main.security/security-ee

/**
 * Check if there is a provider register for a given layer and appCtxt.
 */
protected boolean hasExactMatchAuthProvider() {
  boolean exactMatch = false;
  // XXX this may need to be optimized
  AuthConfigProvider p = 
      factory.getConfigProvider(layer, appCtxt, null);
  if (p != null) {
    String[] IDs = factory.getRegistrationIDs(p);
    for (String i : IDs) {
      RegistrationContext c = factory.getRegistrationContext(i);
      if (layer.equals(c.getMessageLayer()) && 
          appCtxt.equals(c.getAppContext())) {
        exactMatch = true;
        break;
      }
    }
  }
  return exactMatch;
}
origin: org.glassfish.security/security

/**
 * Check if there is a provider register for a given layer and appCtxt.
 */
protected boolean hasExactMatchAuthProvider() {
  boolean exactMatch = false;
  // XXX this may need to be optimized
  AuthConfigProvider p = 
      factory.getConfigProvider(layer, appCtxt, null);
  if (p != null) {
    String[] IDs = factory.getRegistrationIDs(p);
    for (String i : IDs) {
      RegistrationContext c = factory.getRegistrationContext(i);
      if (layer.equals(c.getMessageLayer()) && 
          appCtxt.equals(c.getAppContext())) {
        exactMatch = true;
        break;
      }
    }
  }
  return exactMatch;
}
origin: eclipse-ee4j/glassfish

public boolean contextsAreEqual(RegistrationContext a, RegistrationContext b) {
  if (a == null || b == null) {
    return false;
  } else if (a.isPersistent() != b.isPersistent()) {
    return false;
  } else if (!a.getAppContext().equals(b.getAppContext())) {
    return false;
  } else if (!a.getMessageLayer().equals(b.getMessageLayer())) {
    return false;
  } else if (!a.getDescription().equals(b.getDescription())) {
    return false;
  }
  return true;
}
origin: eclipse-ee4j/glassfish

EntryInfo(String className, Map<String, String> properties,
  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);
    this.regContexts = newList;
  }
}
origin: org.glassfish.main.security/jaspic.provider.framework

EntryInfo(String className, Map<String, String> properties,
  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);
    this.regContexts = newList;
  }
}
origin: org.glassfish.main.security/jaspic.provider.framework

public boolean contextsAreEqual(RegistrationContext a, RegistrationContext b) {
  if (a == null || b == null) {
    return false;
  } else if (a.isPersistent() != b.isPersistent()) {
    return false;
  } else if (!a.getAppContext().equals(b.getAppContext())) {
    return false;
  } else if (!a.getMessageLayer().equals(b.getMessageLayer())) {
    return false;
  } else if (!a.getDescription().equals(b.getDescription())) {
    return false;
  }
  return true;
}
origin: eclipse-ee4j/glassfish

@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() );
}
origin: eclipse-ee4j/glassfish

protected void oldSelfRegister() {
  if (getFactory() != null) {
    selfRegistered.clear();
    RegistrationContext[] contexts = getSelfRegistrationContexts();
    for (RegistrationContext r : contexts) {
      String id = getFactory().registerConfigProvider(this,
          r.getMessageLayer(), r.getAppContext(),
          r.getDescription());
      selfRegistered.add(id);
    }
  }
}
origin: org.glassfish.main.security/jaspic.provider.framework

protected void oldSelfRegister() {
  if (getFactory() != null) {
    selfRegistered.clear();
    RegistrationContext[] contexts = getSelfRegistrationContexts();
    for (RegistrationContext r : contexts) {
      String id = getFactory().registerConfigProvider(this,
          r.getMessageLayer(), r.getAppContext(),
          r.getDescription());
      selfRegistered.add(id);
    }
  }
}
origin: org.glassfish.main.security/jaspic.provider.framework

@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() );
}
origin: org.glassfish.main.security/jaspic.provider.framework

RegistrationContextImpl(RegistrationContext ctx) {
  this.messageLayer = ctx.getMessageLayer();
  this.appContext = ctx.getAppContext();
  this.description = ctx.getDescription();
  this.isPersistent = ctx.isPersistent();
}
origin: eclipse-ee4j/glassfish

RegistrationContextImpl(RegistrationContext ctx) {
  this.messageLayer = ctx.getMessageLayer();
  this.appContext = ctx.getAppContext();
  this.description = ctx.getDescription();
  this.isPersistent = ctx.isPersistent();
}
javax.security.auth.message.configAuthConfigFactory$RegistrationContextgetAppContext

Javadoc

Get the application context identifier from the registration context.

Popular methods of AuthConfigFactory$RegistrationContext

  • getMessageLayer
    Get the layer name from the registration context
  • getDescription
    Get the description from the registration context
  • isPersistent
    Get the persisted status from the registration context.

Popular in Java

  • Reactive rest calls using spring rest template
  • setScale (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now