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

## org.jnp.interfaces
Class NamingContext

    java.lang.Object
      org.jnp.interfaces.NamingContext

All Implemented Interfaces:
  Context, Serializable

public class NamingContext
extends Object
implements Context, Serializable

This class provides the jnp provider Context implementation. It is a Context interface wrapper for a RMI Naming instance that is obtained from either the local server instance or by locating the server given by the Context.PROVIDER_URL value. This class also serves as the jnp url resolution context. jnp style urls passed to the

Version:
  $Revision: 1.33.4.4 $

  Revisions:

  2001/09/14: billb

  1. Provider URL can now be a commented delimited list. Will loop through list until a connection is made.
Author:
  oberg, scott.stark@jboss.org
See Also:
  Serialized Form

Field Summary
`static String` | `DEFAULT_DISCOVERY_GROUP_ADDRESS` The default discovery multicast information
`static int` | `DEFAULT_DISCOVERY_GROUP_PORT`
`static int` | `DEFAULT_DISCOVERY_TIMEOUT`
`static Hashtable` | `haServers`
`static String` | `JNP_DISABLE_DISCOVERY` A flag to disable the broadcast discovery queries
`static String` | `JNP_DISCOVERY_GROUP` The multicast IP/address to which the discovery query is sent
`static String` | `JNP_DISCOVERY_PORT` The port to which the discovery query is sent
`static String` | `JNP_DISCOVERY_TIMEOUT` The time in MS to wait for a discovery query response
`static String` | `JNP_LOCAL_ADDRESS` The local address to bind the connected bootstrap socket to
`static String` | `JNP_LOCAL_PORT` The local port to bind the connected bootstrap socket to
`static String` | `JNP_PARSED_NAME`
`static String` | `JNP_PARTITION_NAME` The cluster partition discovery should be restricted to
`static String` | `JNP_SOCKET_FACTORY` The javax.net.SocketFactory impl to use for the bootstrap socket
`static Naming` | `localServer`
`static int` | `MAX_RETRIES` Maximum number of retries on a ConnectException

Fields inherited from interface javax.naming.Context
`APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES`

Constructor Summary
`NamingContext(Hashtable e, Name baseName, Naming server)`

Method Summary
`Object` | `addToEnvironment(String propName, Object propVal)`
`void` | `bind(Name name, Object obj)`
`void` | `bind(String name, Object obj)`
`void` | `close()`
`Name` | `composeName(Name name, Name prefix)`
`String` | `composeName(String name, String prefix)`
`Context` | `createSubcontext(Name name)`
`Context` | `createSubcontext(String name)`
`void` | `destroySubcontext(Name name)`
`void` | `destroySubcontext(String name)`
`Hashtable` | `getEnvironment()`
`static Naming` | `getHANamingServerForPartition(String partitionName)`
`String` | `getNameInNamespace()`
`NameParser` | `getNameParser(Name name)`
`NameParser` | `getNameParser(String name)`
`Naming` | `getNaming()`
`NamingEnumeration` | `list(Name name)`
`NamingEnumeration` | `list(String name)`
`NamingEnumeration` | `listBindings(Name name)`
`NamingEnumeration` | `listBindings(String name)`
`Object` | `lookup(Name name)`
`Object` | `lookup(String name)`
`Object` | `lookupLink(Name name)` Lookup the object referred to by name but don't dereferrence the final component.
`Object` | `lookupLink(String name)`
`void` | `rebind(Name name, Object obj)`
`void` | `rebind(String name, Object obj)`
`Object` | `removeFromEnvironment(String propName)`
`static void` | `removeHANamingServerForPartition(String partitionName)`
`void` | `rename(Name oldName, Name newName)`
`void` | `rename(String oldname, String newname)`
`protected Object` | `resolveLink(Object res, Hashtable refEnv)`
`static void` | `setHANamingServerForPartition(String partitionName, Naming haServer)`
`static void` | `setLocal(Naming server)`
`void` | `setNaming(Naming server)`
`void` | `unbind(Name name)`
`void` | `unbind(String name)`

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

Field Detail

### JNP_SOCKET_FACTORY

    public static final String JNP_SOCKET_FACTORY

  The javax.net.SocketFactory impl to use for the bootstrap socket

  See Also:
    Constant Field Values

### JNP_LOCAL_ADDRESS

    public static final String JNP_LOCAL_ADDRESS

  The local address to bind the connected bootstrap socket to

  See Also:
    Constant Field Values

### JNP_LOCAL_PORT

    public static final String JNP_LOCAL_PORT

  The local port to bind the connected bootstrap socket to

  See Also:
    Constant Field Values

### JNP_DISABLE_DISCOVERY

    public static final String JNP_DISABLE_DISCOVERY

  A flag to disable the broadcast discovery queries

  See Also:
    Constant Field Values

### JNP_PARTITION_NAME

    public static final String JNP_PARTITION_NAME

  The cluster partition discovery should be restricted to

  See Also:
    Constant Field Values

### JNP_DISCOVERY_GROUP

    public static final String JNP_DISCOVERY_GROUP

  The multicast IP/address to which the discovery query is sent

  See Also:
    Constant Field Values

### JNP_DISCOVERY_PORT

    public static final String JNP_DISCOVERY_PORT

  The port to which the discovery query is sent

  See Also:
    Constant Field Values

### JNP_DISCOVERY_TIMEOUT

    public static final String JNP_DISCOVERY_TIMEOUT

  The time in MS to wait for a discovery query response

  See Also:
    Constant Field Values

### JNP_PARSED_NAME

    public static final String JNP_PARSED_NAME

See Also:
  Constant Field Values

### DEFAULT_DISCOVERY_GROUP_ADDRESS

    public static final String DEFAULT_DISCOVERY_GROUP_ADDRESS

  The default discovery multicast information

  See Also:
    Constant Field Values

### DEFAULT_DISCOVERY_GROUP_PORT

    public static final int DEFAULT_DISCOVERY_GROUP_PORT

See Also:
  Constant Field Values

### DEFAULT_DISCOVERY_TIMEOUT

    public static final int DEFAULT_DISCOVERY_TIMEOUT

See Also:
  Constant Field Values

### MAX_RETRIES

    public static int MAX_RETRIES

  Maximum number of retries on a ConnectException

### haServers

    public static Hashtable haServers

### localServer

    public static Naming localServer

Constructor Detail

### NamingContext

    public NamingContext(Hashtable e,
                         Name baseName,
                         Naming server)
                  throws NamingException

Method Detail

### setHANamingServerForPartition

    public static void setHANamingServerForPartition(String partitionName,
                                                     Naming haServer)

### removeHANamingServerForPartition

    public static void removeHANamingServerForPartition(String partitionName)

### getHANamingServerForPartition

    public static Naming getHANamingServerForPartition(String partitionName)

### setLocal

    public static void setLocal(Naming server)

### getNaming

    public Naming getNaming()

### setNaming

    public void setNaming(Naming server)

### rebind

    public void rebind(String name,
                       Object obj)
                throws NamingException

  Specified by:
    `rebind` in interface `Context`
  Throws:
    `NamingException`

### rebind

    public void rebind(Name name,
                       Object obj)
                throws NamingException

  Specified by:
    `rebind` in interface `Context`
  Throws:
    `NamingException`

### bind

    public void bind(String name,
                     Object obj)
              throws NamingException

  Specified by:
    `bind` in interface `Context`
  Throws:
    `NamingException`

### bind

    public void bind(Name name,
                     Object obj)
              throws NamingException

  Specified by:
    `bind` in interface `Context`
  Throws:
    `NamingException`

### lookup

    public Object lookup(String name)
                  throws NamingException

  Specified by:
    `lookup` in interface `Context`
  Throws:
    `NamingException`

### lookup

    public Object lookup(Name name)
                  throws NamingException

  Specified by:
    `lookup` in interface `Context`
  Throws:
    `NamingException`

### unbind

    public void unbind(String name)
                throws NamingException

  Specified by:
    `unbind` in interface `Context`
  Throws:
    `NamingException`

### unbind

    public void unbind(Name name)
                throws NamingException

  Specified by:
    `unbind` in interface `Context`
  Throws:
    `NamingException`

### rename

    public void rename(String oldname,
                       String newname)
                throws NamingException

  Specified by:
    `rename` in interface `Context`
  Throws:
    `NamingException`

### rename

    public void rename(Name oldName,
                       Name newName)
                throws NamingException

  Specified by:
    `rename` in interface `Context`
  Throws:
    `NamingException`

### list

    public NamingEnumeration list(String name)
                           throws NamingException

  Specified by:
    `list` in interface `Context`
  Throws:
    `NamingException`

### list

    public NamingEnumeration list(Name name)
                           throws NamingException

  Specified by:
    `list` in interface `Context`
  Throws:
    `NamingException`

### listBindings

    public NamingEnumeration listBindings(String name)
                                   throws NamingException

  Specified by:
    `listBindings` in interface `Context`
  Throws:
    `NamingException`

### listBindings

    public NamingEnumeration listBindings(Name name)
                                   throws NamingException

  Specified by:
    `listBindings` in interface `Context`
  Throws:
    `NamingException`

### composeName

    public String composeName(String name,
                              String prefix)
                       throws NamingException

  Specified by:
    `composeName` in interface `Context`
  Throws:
    `NamingException`

### composeName

    public Name composeName(Name name,
                            Name prefix)
                     throws NamingException

  Specified by:
    `composeName` in interface `Context`
  Throws:
    `NamingException`

### getNameParser

    public NameParser getNameParser(String name)
                             throws NamingException

  Specified by:
    `getNameParser` in interface `Context`
  Throws:
    `NamingException`

### getNameParser

    public NameParser getNameParser(Name name)
                             throws NamingException

  Specified by:
    `getNameParser` in interface `Context`
  Throws:
    `NamingException`

### createSubcontext

    public Context createSubcontext(String name)
                             throws NamingException

  Specified by:
    `createSubcontext` in interface `Context`
  Throws:
    `NamingException`

### createSubcontext

    public Context createSubcontext(Name name)
                             throws NamingException

  Specified by:
    `createSubcontext` in interface `Context`
  Throws:
    `NamingException`

### addToEnvironment

    public Object addToEnvironment(String propName,
                                   Object propVal)
                            throws NamingException

  Specified by:
    `addToEnvironment` in interface `Context`
  Throws:
    `NamingException`

### removeFromEnvironment

    public Object removeFromEnvironment(String propName)
                                 throws NamingException

  Specified by:
    `removeFromEnvironment` in interface `Context`
  Throws:
    `NamingException`

### getEnvironment

    public Hashtable getEnvironment()
                             throws NamingException

  Specified by:
    `getEnvironment` in interface `Context`
  Throws:
    `NamingException`

### close

    public void close()
               throws NamingException

  Specified by:
    `close` in interface `Context`
  Throws:
    `NamingException`

### getNameInNamespace

    public String getNameInNamespace()
                              throws NamingException

  Specified by:
    `getNameInNamespace` in interface `Context`
  Throws:
    `NamingException`

### destroySubcontext

    public void destroySubcontext(String name)
                           throws NamingException

  Specified by:
    `destroySubcontext` in interface `Context`
  Throws:
    `NamingException`

### destroySubcontext

    public void destroySubcontext(Name name)
                           throws NamingException

  Specified by:
    `destroySubcontext` in interface `Context`
  Throws:
    `NamingException`

### lookupLink

    public Object lookupLink(String name)
                      throws NamingException

  Specified by:
    `lookupLink` in interface `Context`
  Throws:
    `NamingException`

### lookupLink

    public Object lookupLink(Name name)
                      throws NamingException

  Lookup the object referred to by name but don't dereferrence the final component. This really just involves returning the raw value returned by the Naming.lookup() method.

  Specified by:
    `lookupLink` in interface `Context`
  Returns:
    the raw object bound under name.
  Throws:
    `NamingException`

### resolveLink

    protected Object resolveLink(Object res,
                                 Hashtable refEnv)
                          throws NamingException

  Throws:
    `NamingException`

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

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.