/[classpath]/classpath/gnu/CORBA/Functional_ORB.java
ViewVC logotype

Diff of /classpath/gnu/CORBA/Functional_ORB.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by audriusa, Mon Aug 29 21:18:31 2005 UTC revision 1.18 by audriusa, Fri Sep 2 15:53:05 2005 UTC
# Line 386  public class Functional_ORB extends Rest Line 386  public class Functional_ORB extends Rest
386     * The port, on that the name service is expected to be running.     * The port, on that the name service is expected to be running.
387     */     */
388    private int ns_port = 900;    private int ns_port = 900;
389      
390      /**
391       * The name parser.
392       */
393      NameParser nameParser = new NameParser();
394    
395    /**    /**
396     * The instance, stored in this field, handles the asynchronous dynamic     * The instance, stored in this field, handles the asynchronous dynamic
# Line 945  public class Functional_ORB extends Rest Line 950  public class Functional_ORB extends Rest
950     */     */
951    public org.omg.CORBA.Object string_to_object(String an_ior)    public org.omg.CORBA.Object string_to_object(String an_ior)
952    {    {
953      int p = an_ior.indexOf(':');      return nameParser.corbaloc(an_ior, this);
     if (p < 0)  
       throw new BAD_PARAM("IOR: or CORBALOC: prefix expected");  
   
     String prefix = an_ior.substring(0, p).toLowerCase();  
   
     if (prefix.equals("ior"))  
       {  
         IOR ior = IOR.parse(an_ior);  
         return ior_to_object(ior);  
       }  
     else if (prefix.equals("corbaloc"))  
       {  
         java.lang.Object r = NameParser.corbaloc(an_ior, this);  
         if (r instanceof IOR)  
           return ior_to_object((IOR) r);  
         else  
           return (org.omg.CORBA.Object) r;  
       }  
     else throw new DATA_CONVERSION("Unsupported prefix '"+prefix+"'");  
954    }    }
955        
956    /**    /**
957     * Convert ior reference to CORBA object.     * Convert ior reference to CORBA object.
958     */     */
959    private org.omg.CORBA.Object ior_to_object(IOR ior)    public org.omg.CORBA.Object ior_to_object(IOR ior)
960    {    {
961      org.omg.CORBA.Object object = find_local_object(ior);      org.omg.CORBA.Object object = find_local_object(ior);
962      if (object == null)      if (object == null)

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26