Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gov.lanl.Utility
Class NameService  view NameService download NameService.java

java.lang.Object
  extended bygov.lanl.Utility.NameService

public class NameService
extends java.lang.Object

NameService utility class It locates and connects to the NameService and enables registration to the Name Service By default it uses NamingContextExt but can be recompiled to use the older NamingContext interface because it provides the extra utility classes internally. Additionally, it allows for connection to an insecure NameService from an SSL application using the locally developed ServiceInterface.

Version:
$Id: NameService.java,v 1.23 2003/02/26 23:06:36 dwforslund Exp $

Field Summary
private static org.apache.log4j.Logger cat
           
private static java.lang.String nameServiceIOR
           
private  org.omg.CosNaming.NamingContextExt nc
           
private static NameService ns
           
private static gov.lanl.SSLTools.ServiceInterface service
           
 
Constructor Summary
NameService(org.omg.CORBA.ORB orb, java.lang.String iorURL)
          Build internal reference to the NameService from an ior or by default
NameService(gov.lanl.SSLTools.ServiceInterface service, java.lang.String iorURL)
          Build internal reference using SSL interface
NameService(java.lang.String[] args, java.util.Properties props, java.lang.String iorURL)
          Constructor without an orb (creates one internally)
 
Method Summary
private  void bind(org.omg.CosNaming.NameComponent[] name)
          Bind all of the subcomponents of the NameComponent
 org.omg.CORBA.Object connect(java.lang.String serverName)
          Obtain Object reference from the NameService
static NameService current()
          return the current NameService or create a new onel, if possible
 void find(java.lang.String nameContext)
          List all of the Names in the given NameContext
private  void init(org.omg.CORBA.ORB orb, java.lang.String iorURL)
          initialization of NameService
 void register(org.omg.CORBA.Object obj, java.lang.String serviceName)
          Register CORBA object to this NameService using serviceName
 org.omg.CosNaming.NameComponent[] to_name(java.lang.String serviceName)
          function to turn string into a NameComponent array used when there is no NameContextExt implementation (also handles wild cards per spec)
 java.lang.String to_string(org.omg.CosNaming.NameComponent[] nameComponentList)
          Convert NameComponent[] into a String It will quote any literal '.', '/', and '\' characters by adding a preceding '\'
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nc

private org.omg.CosNaming.NamingContextExt nc

service

private static gov.lanl.SSLTools.ServiceInterface service

ns

private static NameService ns

nameServiceIOR

private static java.lang.String nameServiceIOR

cat

private static org.apache.log4j.Logger cat
Constructor Detail

NameService

public NameService(gov.lanl.SSLTools.ServiceInterface service,
                   java.lang.String iorURL)
Build internal reference using SSL interface


NameService

public NameService(org.omg.CORBA.ORB orb,
                   java.lang.String iorURL)
Build internal reference to the NameService from an ior or by default


NameService

public NameService(java.lang.String[] args,
                   java.util.Properties props,
                   java.lang.String iorURL)
Constructor without an orb (creates one internally)

Method Detail

current

public static NameService current()
return the current NameService or create a new onel, if possible


init

private void init(org.omg.CORBA.ORB orb,
                  java.lang.String iorURL)
initialization of NameService


register

public void register(org.omg.CORBA.Object obj,
                     java.lang.String serviceName)
Register CORBA object to this NameService using serviceName


to_name

public org.omg.CosNaming.NameComponent[] to_name(java.lang.String serviceName)
function to turn string into a NameComponent array used when there is no NameContextExt implementation (also handles wild cards per spec)


to_string

public java.lang.String to_string(org.omg.CosNaming.NameComponent[] nameComponentList)
Convert NameComponent[] into a String It will quote any literal '.', '/', and '\' characters by adding a preceding '\'


connect

public org.omg.CORBA.Object connect(java.lang.String serverName)
Obtain Object reference from the NameService


find

public void find(java.lang.String nameContext)
List all of the Names in the given NameContext


bind

private void bind(org.omg.CosNaming.NameComponent[] name)
Bind all of the subcomponents of the NameComponent