geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject cvs commit: incubator-geronimo/sandbox/webdav/src/java/org/apache/geronimo/datastore/impl/remote/datastore GFileManagerClient.java
Date Mon, 01 Mar 2004 13:20:18 GMT
gdamour     2004/03/01 05:20:18

  Modified:    sandbox/webdav/src/java/org/apache/geronimo/datastore/impl/remote/datastore
                        GFileManagerClient.java
  Log:
  A GFileManagerClient requires now the name of the node hosting
  the GFileManagerProxy to be mirrored.
  
  Revision  Changes    Path
  1.2       +24 -7     incubator-geronimo/sandbox/webdav/src/java/org/apache/geronimo/datastore/impl/remote/datastore/GFileManagerClient.java
  
  Index: GFileManagerClient.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/webdav/src/java/org/apache/geronimo/datastore/impl/remote/datastore/GFileManagerClient.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- GFileManagerClient.java	25 Feb 2004 13:36:15 -0000	1.1
  +++ GFileManagerClient.java	1 Mar 2004 13:20:18 -0000	1.2
  @@ -45,11 +45,16 @@
       private static final Log log = LogFactory.getLog(GFileManagerClient.class);
   
       /**
  -     * Name of this client. 
  +     * Name of the proxy to be mirrorer. 
        */
       private final String name;
       
       /**
  +     * Name of the node hosting the proxy to be mirrored.
  +     */
  +    private final String nodeName; 
  +    
  +    /**
        * Msg output to be used by this client to communicate with its proxy.
        */
       private MsgOutInterceptor out;
  @@ -66,12 +71,16 @@
        * of the proxy to be mirrored.
        * 
        * @param aName Name of the proxy to be mirrored.
  +     * @param aNodeName Name of the node hosting the proxy.
        */
  -    public GFileManagerClient(String aName) {
  +    public GFileManagerClient(String aName, String aNodeName) {
           if ( null == aName ) {
               throw new IllegalArgumentException("Name is required.");
  +        } else if ( null == aNodeName ) {
  +            throw new IllegalArgumentException("NodeName is required.");
           }
           name = aName;
  +        nodeName = aNodeName;
           sender = new RequestSender();
       }
       
  @@ -79,6 +88,10 @@
           return name;
       }
       
  +    public String getNodeName() {
  +        return nodeName;
  +    }
  +    
       public void start() {
           sender.sendSyncRequest(new ProxyCommand("start", null), out);
       }
  @@ -125,10 +138,14 @@
   
       public void setOutput(MsgOutInterceptor anOut) {
           if ( null != anOut ) {
  -            out = new HeaderOutInterceptor(
  -                MsgHeaderConstants.DEST_CONNECTOR,
  -                name,
  -                anOut);
  +            out =
  +                new HeaderOutInterceptor(
  +                    MsgHeaderConstants.DEST_CONNECTOR,
  +                    name,
  +                    new HeaderOutInterceptor(
  +                        MsgHeaderConstants.DEST_NODE,
  +                        nodeName,
  +                        anOut));
           } else {
               out = null;
           }
  
  
  

Mime
View raw message