avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: jakarta-avalon-apps/enterprise/time build.xml
Date Sat, 14 Sep 2002 21:18:09 GMT
mcconnell    2002/09/14 14:18:09

  Modified:    enterprise/corbaloc build.xml
               enterprise/corbaloc/src/idl corbaloc.idl
               enterprise/corbaloc/src/java/org/apache/orb/corbaloc
                        CorbalocURLConnection.java DescriptorValue.java
               enterprise/orb/src/java/org/apache/orb ORB.java ORB.xinfo
               enterprise/time build.xml
  Log:
  Minor updates related to corbaloc handling.
  
  Revision  Changes    Path
  1.3       +1 -0      jakarta-avalon-apps/enterprise/corbaloc/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/corbaloc/build.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build.xml	11 Sep 2002 06:56:19 -0000	1.2
  +++ build.xml	14 Sep 2002 21:18:09 -0000	1.3
  @@ -122,6 +122,7 @@
   		<path refid="project.classpath"/>
   	    </classpath>
   	    <arg line="-silence"/>
  +	    <arg line="-native ORB org.omg.CORBA.ORB"/>
   	    <arg line="-native URL java.net.URL"/>
   	    <arg line="-native Version org.apache.avalon.framework.Version"/>
   	    <arg line="-d ${build.dir}/src"/>
  
  
  
  1.3       +14 -0     jakarta-avalon-apps/enterprise/corbaloc/src/idl/corbaloc.idl
  
  Index: corbaloc.idl
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/corbaloc/src/idl/corbaloc.idl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- corbaloc.idl	11 Sep 2002 06:56:20 -0000	1.2
  +++ corbaloc.idl	14 Sep 2002 21:18:09 -0000	1.3
  @@ -17,7 +17,9 @@
   module corbaloc
   {
   
  +    native ORB;
       native Version;
  +    native URL;
   
       valuetype Attribute;
   
  @@ -93,6 +95,11 @@
           private string m_version;
   
          /**
  +        * The service corbaloc url.
  +        */
  +        private string m_url;
  +
  +       /**
           * The nested attributes.
           */
           private Attributes m_attributes;
  @@ -108,6 +115,13 @@
           * @return the service version
           */
           Version getVersion();
  +
  +       /**
  +        * Returns a service corbaloc url.
  +        * @param orb the ORB instance to use when resolving the URL value
  +        * @return the service URL
  +        */
  +        URL getURL( in ORB orb );
       };
   
      /**
  
  
  
  1.4       +29 -27    jakarta-avalon-apps/enterprise/corbaloc/src/java/org/apache/orb/corbaloc/CorbalocURLConnection.java
  
  Index: CorbalocURLConnection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/corbaloc/src/java/org/apache/orb/corbaloc/CorbalocURLConnection.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CorbalocURLConnection.java	9 Sep 2002 05:13:40 -0000	1.3
  +++ CorbalocURLConnection.java	14 Sep 2002 21:18:09 -0000	1.4
  @@ -130,7 +130,9 @@
                   {
                       try
                       {
  -                        return getCORBAObject( path.substring(0, i ), path.substring( i
) + remainder ); 
  +                        return getCORBAObject( 
  +                          path.substring(0, i ), 
  +                          path.substring( i ) + remainder ); 
                       }
                       catch( IOException ioe )
                       {
  @@ -176,31 +178,6 @@
        */
        public Object getContent() throws IOException
        {
  -         return getContent( new Class[0] );
  -     }
  -
  -    /**
  -     * Retrieves the contents of this URL connection. 
  -     *
  -     * @param classes the <code>Class</code> array 
  -     * indicating the requested types
  -     * @return     the object fetched that is the first match of the type
  -     *               specified in the classes array. null if none of 
  -     *               the requested types are supported.
  -     *               The <code>instanceOf</code> operation should be used to

  -     *               determine the specific kind of object returned.
  -     * @exception  IOException              if an I/O error occurs while
  -     *               getting the content.
  -     */
  -    public Object getContent( Class[] classes ) throws IOException 
  -    {
  -        //
  -        // currently returns the primary object established by the 
  -        // raw corbaloc URL - could be upgraded to allow association
  -        // of a content handler factory and handling of responses via
  -        // return getContentHandler().getContent(this, classes);
  -        //
  -
           if( m_carrier == null )
           {
               connect();
  @@ -294,7 +271,7 @@
                   throw new IOException( error );
               }
   
  -            return redirect.getContent( classes );
  +            return redirect.getContent();
           }
           catch( InvalidQuery e )
           {
  @@ -318,6 +295,31 @@
                 + e.getMessage() + " while handling the url " + m_url;
               throw new IOException( error );
           }
  +    }
  +
  +    /**
  +     * Retrieves the contents of this URL connection. 
  +     *
  +     * @param classes the <code>Class</code> array 
  +     * indicating the requested types
  +     * @return     the object fetched that is the first match of the type
  +     *               specified in the classes array. null if none of 
  +     *               the requested types are supported.
  +     *               The <code>instanceOf</code> operation should be used to

  +     *               determine the specific kind of object returned.
  +     * @exception  IOException              if an I/O error occurs while
  +     *               getting the content.
  +     */
  +    public Object getContent( Class[] classes ) throws IOException 
  +    {
  +        //
  +        // return the primary object established by the 
  +        // raw corbaloc URL - could be upgraded to allow association
  +        // of a content handler factory and handling of responses via
  +        // return getContentHandler().getContent(this, classes);
  +        //
  +
  +        return getContent();
       }
   
      /**
  
  
  
  1.2       +34 -2     jakarta-avalon-apps/enterprise/corbaloc/src/java/org/apache/orb/corbaloc/DescriptorValue.java
  
  Index: DescriptorValue.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/corbaloc/src/java/org/apache/orb/corbaloc/DescriptorValue.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DescriptorValue.java	11 Sep 2002 06:56:20 -0000	1.1
  +++ DescriptorValue.java	14 Sep 2002 21:18:09 -0000	1.2
  @@ -12,7 +12,9 @@
   
   import java.io.Serializable;
   import java.util.ArrayList;
  +import java.net.URL;
   
  +import org.omg.CORBA.ORB;
   import org.omg.CORBA.TypeCode;
   import org.omg.CORBA.portable.StreamableValue;
   import org.omg.CORBA_2_3.portable.InputStream;
  @@ -30,6 +32,12 @@
   {
   
       //==========================================================
  +    // state
  +    //==========================================================
  +
  +    private URL m_corbaloc;
  +
  +    //==========================================================
       // constructors
       //==========================================================
       
  @@ -43,15 +51,17 @@
      /**
       * Creation of a new descriptor based on a supplied meta info description.
       *
  -    * @param type the type descriptor
  +    * @param corbaloc the corbaloc url
  +    * @param service the service descriptor
       */
  -    public DescriptorValue( ServiceDescriptor service ) 
  +    public DescriptorValue( URL corbaloc, ServiceDescriptor service )
       {
           ArrayList list = new ArrayList();
           String[] keys = service.getAttributeNames();
   
           m_type = service.getService().getClassname();
           m_version = service.getService().getVersion().toString();
  +        m_url = corbaloc.toExternalForm();
   
           for( int i=0; i<keys.length; i++ )
           {
  @@ -92,6 +102,28 @@
       public Version getVersion()
       {
           return Version.getVersion( m_version );
  +    }
  +
  +   /**
  +    * Returns a service url.
  +    * @param orb the ORB to be used when resolving the URL value
  +    * @return the service corbaloc URL
  +    */
  +    public URL getURL( ORB orb )
  +    {
  +        if( m_corbaloc == null )
  +        {
  +            try
  +            {
  +                m_corbaloc = new URL( null, m_url, new Handler( orb ) );
  +            }
  +            catch( Throwable e )
  +            {
  +                throw new IllegalStateException(
  +                  "Supplied url: " + m_url + " is invalid: " + e.getMessage() );
  +            }
  +        }
  +        return m_corbaloc;
       }
   
      /**
  
  
  
  1.9       +20 -1     jakarta-avalon-apps/enterprise/orb/src/java/org/apache/orb/ORB.java
  
  Index: ORB.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/orb/src/java/org/apache/orb/ORB.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ORB.java	8 Sep 2002 16:10:12 -0000	1.8
  +++ ORB.java	14 Sep 2002 21:18:09 -0000	1.9
  @@ -71,7 +71,7 @@
    */
   public class ORB extends org.openorb.CORBA.ORB
   implements Configurable, Contextualizable, Initializable, Startable, Disposable,
  -ServiceManager
  +ServiceManager, POAContext
   {
   
       //=================================================================
  @@ -398,4 +398,23 @@
               throw new CascadingRuntimeException( error, e );
           }
       }
  +
  +   /**
  +    * Returns a context value given a context key.
  +    * @param key the context key
  +    * @return Object the context value
  +    * @exception ContextException if the key is unknown within the context scope
  +    */
  +    public Object get( Object key ) throws ContextException
  +    {
  +        if( key.equals( POAContext.POA_KEY ) ) 
  +        {
  +            return getPOA();
  +        }
  +        else 
  +        {
  +            throw new ContextException("unknown key: " + key );
  +        }
  +    }
  +
   }
  
  
  
  1.8       +3 -0      jakarta-avalon-apps/enterprise/orb/src/java/org/apache/orb/ORB.xinfo
  
  Index: ORB.xinfo
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/orb/src/java/org/apache/orb/ORB.xinfo,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ORB.xinfo	8 Sep 2002 16:10:12 -0000	1.7
  +++ ORB.xinfo	14 Sep 2002 21:18:09 -0000	1.8
  @@ -13,6 +13,9 @@
       <service> 
         <reference type="org.apache.orb.ORB" version="2.4"/>
       </service> 
  +    <service> 
  +      <reference type="org.apache.orb.POAContext" />
  +    </service> 
     </services>
   
   </type>
  
  
  
  1.11      +2 -3      jakarta-avalon-apps/enterprise/time/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/enterprise/time/build.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- build.xml	8 Sep 2002 16:10:13 -0000	1.10
  +++ build.xml	14 Sep 2002 21:18:09 -0000	1.11
  @@ -47,12 +47,11 @@
       </echo>
     </target>
   
  -  <property name="VERSION" value="${MAJOR}.${MINOR}.${MICRO}"/>
  +  <property name="VERSION" value="${MAJOR}.${MINOR}"/>
   
     <property name="tools.lib.path" value="${tools.path}/lib" />
     <property name="orb.path"  value="${enterprise.path}/orb" />
     <property name="orb.lib.path"  value="${orb.path}/lib" />
  -  <property name="orb.dist.path"  value="${orb.path}/dist" />
   
     <property name="time.jar" value="time-${VERSION}.jar" />
   
  @@ -82,7 +81,7 @@
         <fileset dir="${orb.lib.path}">
           <include name="openorb*.jar" />
         </fileset>
  -      <fileset dir="${orb.dist.path}">
  +      <fileset dir="${orb.path}/build">
           <include name="*.jar" />
         </fileset>
         <fileset dir="${common.path}/lib">
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message