Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache JMeter
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.jmeter.protocol.jms.client
Class InitialContextFactory

    java.lang.Object
      org.apache.jmeter.protocol.jms.client.InitialContextFactory

    public class InitialContextFactory

extends Object

InitialContextFactory is responsible for getting an instance of the initial context.

Constructor Summary
`InitialContextFactory()`

Method Summary
`static void` | `close()` clear all the InitialContext objects.
`static Context` | `getContext(boolean useProps, String initialContextFactory, String providerUrl, boolean useAuth, String securityPrincipal, String securityCredentials)` Initialize the JNDI initial context
`static Context` | `lookupContext(String initialContextFactory, String providerUrl, boolean useAuth, String securityPrincipal, String securityCredentials)` Look up the context from the local cache, creating it if necessary.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### InitialContextFactory

    public InitialContextFactory()

Method Detail

### lookupContext

    public static Context lookupContext(String initialContextFactory,
                                        String providerUrl,
                                        boolean useAuth,
                                        String securityPrincipal,
                                        String securityCredentials)
                                 throws NamingException

  Look up the context from the local cache, creating it if necessary.

  Parameters:
    `initialContextFactory` - used to set the property `Context.INITIAL_CONTEXT_FACTORY`
    `providerUrl` - used to set the property `Context.PROVIDER_URL`
    `useAuth` - set true if security is to be used.
    `securityPrincipal` - used to set the property `Context.SECURITY_PRINCIPAL`
    `securityCredentials` - used to set the property `Context.SECURITY_CREDENTIALS`
  Returns:
    the context, never null
  Throws:
    `NamingException`

### getContext

    public static Context getContext(boolean useProps,
                                     String initialContextFactory,
                                     String providerUrl,
                                     boolean useAuth,
                                     String securityPrincipal,
                                     String securityCredentials)
                              throws NamingException

  Initialize the JNDI initial context

  Parameters:
    `useProps` - if true, create a new InitialContext; otherwise use the other parameters to call `lookupContext(String, String, boolean, String, String)`
    `initialContextFactory` -
    `providerUrl` -
    `useAuth` -
    `securityPrincipal` -
    `securityCredentials` -
  Returns:
    the context, never null
  Throws:
    `NamingException`

### close

    public static void close()

  clear all the InitialContext objects.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache JMeter
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1998-2012 Apache Software Foundation. All Rights Reserved.