org.jboss.dna.graph
Class BasicExecutionContextFactory

java.lang.Object
  extended by org.jboss.dna.graph.BasicExecutionContextFactory
All Implemented Interfaces:
ExecutionContextFactory

public class BasicExecutionContextFactory
extends Object
implements ExecutionContextFactory

Basic implementation of a ExecutionContextFactory that returns basic ExecutionContexts.

Author:
Randall Hauch

Constructor Summary
BasicExecutionContextFactory()
          Create a new instance of this factory.
BasicExecutionContextFactory(String defaultNamespaceUri)
          Create a new instance of this factory.
 
Method Summary
 ExecutionContext create()
          Creates an ExecutionContext using a snapshot of the access control context obtained from the current calling context.
 ExecutionContext create(AccessControlContext accessControlContext)
          Creates an ExecutionContext using the supplied access control context.
 ExecutionContext create(LoginContext loginContext)
          Create an ExecutionContext for the supplied LoginContext.
 ExecutionContext create(String name)
          
 ExecutionContext create(String name, CallbackHandler callbackHandler)
          
 ExecutionContext create(String name, Subject subject)
          
 ExecutionContext create(String name, Subject subject, CallbackHandler callbackHandler)
          
 NamespaceRegistry getDefaultNamespaces()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicExecutionContextFactory

public BasicExecutionContextFactory()
Create a new instance of this factory.


BasicExecutionContextFactory

public BasicExecutionContextFactory(String defaultNamespaceUri)
Create a new instance of this factory.

Parameters:
defaultNamespaceUri - the URI of the namespace that should be used with names that have no specified namespace prefix
Throws:
IllegalArgumentException - if the URI is null
Method Detail

getDefaultNamespaces

public NamespaceRegistry getDefaultNamespaces()
Returns:
defaultNamespaces

create

public ExecutionContext create()
Creates an ExecutionContext using a snapshot of the access control context obtained from the current calling context.

Specified by:
create in interface ExecutionContextFactory
Returns:
the execution context; never null.
See Also:
ExecutionContextFactory.create()

create

public ExecutionContext create(AccessControlContext accessControlContext)
Creates an ExecutionContext using the supplied access control context.

Specified by:
create in interface ExecutionContextFactory
Parameters:
accessControlContext - An access control context.
Returns:
the execution context; never null.
See Also:
ExecutionContextFactory.create(java.security.AccessControlContext)

create

public ExecutionContext create(LoginContext loginContext)
Create an ExecutionContext for the supplied LoginContext.

Specified by:
create in interface ExecutionContextFactory
Parameters:
loginContext - the JAAS login context
Returns:
the execution context
See Also:
ExecutionContextFactory.create(javax.security.auth.login.LoginContext)

create

public ExecutionContext create(String name)
                        throws LoginException

Specified by:
create in interface ExecutionContextFactory
Parameters:
name - the name of the JAAS login context
Returns:
the execution context
Throws:
LoginException - if there name is invalid (or there is no login context named "other"), or if the default callback handler JAAS property was not set or could not be loaded
See Also:
ExecutionContextFactory.create(java.lang.String)

create

public ExecutionContext create(String name,
                               Subject subject)
                        throws LoginException

Specified by:
create in interface ExecutionContextFactory
Parameters:
name - the name of the JAAS login context
subject - the subject to authenticate
Returns:
the execution context
Throws:
LoginException - if there name is invalid (or there is no login context named "other"), if the default callback handler JAAS property was not set or could not be loaded, or if the subject is null or unknown
See Also:
ExecutionContextFactory.create(java.lang.String, javax.security.auth.Subject)

create

public ExecutionContext create(String name,
                               CallbackHandler callbackHandler)
                        throws LoginException

Specified by:
create in interface ExecutionContextFactory
Parameters:
name - the name of the JAAS login context
callbackHandler - the callback handler that will be used by LoginModules to communicate with the user.
Returns:
the execution context
Throws:
LoginException - if there name is invalid (or there is no login context named "other"), or if the callbackHandler is null
See Also:
ExecutionContextFactory.create(java.lang.String, javax.security.auth.callback.CallbackHandler)

create

public ExecutionContext create(String name,
                               Subject subject,
                               CallbackHandler callbackHandler)
                        throws LoginException

Specified by:
create in interface ExecutionContextFactory
Parameters:
name - the name of the JAAS login context
subject - the subject to authenticate
callbackHandler - the callback handler that will be used by LoginModules to communicate with the user.
Returns:
the execution context
Throws:
LoginException - if there name is invalid (or there is no login context named "other"), if the default callback handler JAAS property was not set or could not be loaded, if the subject is null or unknown, or if the callbackHandler is null
See Also:
ExecutionContextFactory.create(java.lang.String, javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler)


Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.