Changeset 2157


Ignore:
Timestamp:
2001-03-11T23:58:37+13:00 (23 years ago)
Author:
say1
Message:

fixed Makefiles to stop deleting html files. Added the notion of a Wrapper. Converted NzdlCachingServiceClient to NzdlCacheWrapper. Added NzdlDocSaveWrapper. Added NzdlLogWrapper. Added functionality to NzdlIORs to use these.

Location:
trunk/java-client
Files:
4 added
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/java-client/Makefile

    r2155 r2157  
    4040
    4141clean :
     42    rm -f log.file.*
     43    rm -f knownIORs.properties
    4244    (cd gnu/getopt && $(MAKE) clean)
    4345    (cd org/nzdl/gsdl && $(MAKE) clean)
  • trunk/java-client/README

    r2097 r2157  
    99   David Bainbridge <[email protected]>
    1010   Dave Nichols <[email protected]>,
    11    Brett Sheeran <[email protected]>
     11   Brett Sheeran <[email protected]> (bas6 in the cvs log)
    1212   Stuart Yeates <[email protected]>
    1313
  • trunk/java-client/org/nzdl/gsdl/Makefile

    r2143 r2157  
    66
    77subdirs :
     8    (cd service && $(MAKE) all)
     9    (cd util && $(MAKE) all)
     10    (cd ptp && $(MAKE) all)
    811    (cd SimpleGraphicalClient && $(MAKE) all)
    9     (cd util && $(MAKE) all)
    10     (cd service && $(MAKE) all)
    11     (cd ptp && $(MAKE) all)
    1212
    1313clean:
  • trunk/java-client/org/nzdl/gsdl/ptp/Makefile

    r2119 r2157  
    2525clean:
    2626    rm -f *.class
    27     rm -f *.html
    2827
    2928
  • trunk/java-client/org/nzdl/gsdl/service/Makefile

    r2151 r2157  
    2222          NzdlServiceClient.class \
    2323          NzdlServiceServer.class \
    24           NzdlServiceCachingClient.class
     24          NzdlWrapper.class \
     25          NzdlLogWrapper.class \
     26          NzdlDocSaveWrapper.class \
     27          NzdlCacheWrapper.class
    2528
    2629
     
    2932clean:
    3033    rm -f *.class
    31     rm -f *.html
    3234
    3335
  • trunk/java-client/org/nzdl/gsdl/service/NzdlServiceClient.java

    r2155 r2157  
    2121package org.nzdl.gsdl.service;
    2222
    23 import java.io.*;
    24 import java.util.*;
     23//import java.io.*;
     24//import java.util.*;
     25import java.util.Map;
     26import java.util.Set;
     27import java.util.List;
     28import java.util.HashSet;
     29import java.util.Properties;
     30
    2531/* jdk 1.3 orb */
    26 import org.omg.CORBA.*;
     32import org.omg.CORBA.ORB;
    2733/* gsdl corba stuff */
    2834import org.nzdl.gsdl.corba.gsdlInterface.*;
  • trunk/java-client/org/nzdl/gsdl/util/Makefile

    r2135 r2157  
    2222clean:
    2323    rm -f *.class
    24     rm -f *.html
    2524
    2625
  • trunk/java-client/org/nzdl/gsdl/util/NzdlIORs.java

    r2152 r2157  
    5757import org.nzdl.gsdl.service.NzdlService;
    5858import org.nzdl.gsdl.service.NzdlServiceClient;
    59 import org.nzdl.gsdl.service.NzdlServiceCachingClient;
     59import org.nzdl.gsdl.service.NzdlCacheWrapper;
     60import org.nzdl.gsdl.service.NzdlLogWrapper;
     61import org.nzdl.gsdl.service.NzdlDocSaveWrapper;
    6062
    6163/**
     
    100102
    101103  /** Are we using a caching NzdlService ? */
    102   static public boolean nzdlServiceCachingClass = true;
     104  static public boolean caching = true;
     105  /** Are we logging before the cache ? */
     106  static public boolean logBefore = true;
     107  /** Are we logging after the cache ? */
     108  static public boolean logAfter = true;
     109  /** Are we saving documents ? */
     110  static public boolean saveDocs = true;
    103111
    104112  /**
     
    186194   * @see org.omg.CORBA.ORB
    187195   */
    188   public static NzdlServiceClient findIOR(String [] _args,
    189                       String _URL,
    190                       String _filename,
    191                       String _IOR)  {
     196  public static NzdlService findIOR(String [] _args,
     197                    String _URL,
     198                    String _filename,
     199                    String _IOR)  {
    192200   
    193201    // read our prevously seed IORs ...
    194202    String IOR = null;
    195     NzdlServiceClient client = null;
     203    NzdlService client = null;
    196204     
    197205    // try a URL from the command line
     
    376384   * @return the newly created NzdlServiceClient
    377385   */
    378   static public NzdlServiceClient attemptToInitialise(String [] _args,
     386  static public NzdlService attemptToInitialise(String [] _args,
    379387                      Properties _props,
    380388                      String _IOR) {
    381389    checkLoaded();
    382     NzdlServiceClient nzdl = null;
     390    NzdlService nzdl = null;
    383391    try {
    384       if (nzdlServiceCachingClass)
    385     nzdl = new NzdlServiceCachingClient( _args, _props, _IOR);
    386       else
    387     nzdl = new NzdlServiceClient( _args, _props, _IOR);
     392      nzdl = new NzdlServiceClient( _args, _props, _IOR);
    388393    } catch (Throwable t) {
    389394      System.err.println ("failed to initialise using:");
     
    391396      return null;
    392397    }
     398    if (saveDocs)
     399      nzdl = new NzdlDocSaveWrapper(nzdl);
     400
     401    if (logAfter)
     402      nzdl = new NzdlLogWrapper(nzdl, "log.file.after.cache", "AFTER: ");
     403
     404    if (caching)
     405      nzdl = new NzdlCacheWrapper(nzdl);
     406
     407    if (logBefore)
     408      nzdl = new NzdlLogWrapper(nzdl, "log.file.before.cache", "BEFORE: ");
    393409    return nzdl;
    394410  }
Note: See TracChangeset for help on using the changeset viewer.