BEA Systems, Inc.

BEA WebLogic Server 9.1 API Reference


weblogic.jndi
Interface ClientEnvironment

All Known Implementing Classes:
Environment

public interface ClientEnvironment

This is an environment that can be used on a thinner client. The server implementation may do things that the client implementation cannot do. In order to keep the thin client thin, this class may not pull in any weblogic specific classes.

Copyright © 2005 BEA Systems, Inc. All Rights Reserved.

Method Summary
 Context getContext()
          Returns a context that can be used with this environment.
 Hashtable getProperties()
          Gets the environment hashtable associated with this environment
 weblogic.security.subject.AbstractSubject getSubject()
          Gets the subject that has been associated with this thread, or null if there has not been one.
 void setEnableServerAffinity(boolean enableServerAffinity)
          Sets the WLContext.ENABLE_SERVER_AFFINITY property
 void setProviderURL(String providerURL)
          Sets the Context.PROVIDER_URL property
 void setSecurityCredentials(Object password)
          Sets the Context.SECURITY_CREDENTIALS property
 void setSecurityPrincipal(String username)
          Sets the Context.SECURITY_PRINCIPAL property
 

Method Detail

getContext

public Context getContext()
                   throws NamingException
Returns a context that can be used with this environment. Note that the context to the system identified in the properties is only gotten once. Subsequent calls to this method will always return the previously returned context. No new context will be gotten once the initial context has been established. Create a new ClientEnvironment if you want to attempt a different connection to a remote naming context.

Returns:
A naming context that can be used by this client
Throws:
NamingException

getProperties

public Hashtable getProperties()
Gets the environment hashtable associated with this environment

Returns:

getSubject

public weblogic.security.subject.AbstractSubject getSubject()
Gets the subject that has been associated with this thread, or null if there has not been one.

Returns:
A subject if one has been pushed onto the stack

setEnableServerAffinity

public void setEnableServerAffinity(boolean enableServerAffinity)
Sets the WLContext.ENABLE_SERVER_AFFINITY property

Parameters:
enableServerAffinity -

setProviderURL

public void setProviderURL(String providerURL)
Sets the Context.PROVIDER_URL property

Parameters:
providerURL - The url to use with this environment

setSecurityCredentials

public void setSecurityCredentials(Object password)
Sets the Context.SECURITY_CREDENTIALS property

Parameters:
password - The password to use with this environment

setSecurityPrincipal

public void setSecurityPrincipal(String username)
Sets the Context.SECURITY_PRINCIPAL property

Parameters:
username - The username to use with this environment

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs91
Copyright 2005 BEA Systems Inc.