View Javadoc

1   package org.astrogrid.jes.delegate.impl;
2   
3   
4   /***
5    * Abstract implementation of a job monitor delegate
6    */
7   public abstract class JobMonitorDelegate   extends AbstractDelegate implements org.astrogrid.jes.delegate.JobMonitor{
8   
9       public static JobMonitorDelegate buildDelegate( String targetEndPoint ){
10          return JobMonitorDelegate.buildDelegate( targetEndPoint, DEFAULT_TIMEOUT ) ;
11      }
12      
13      /***
14  
15       * @param targetEndPoint
16       * @param timeout
17       * @return
18       */
19      public static JobMonitorDelegate buildDelegate( String targetEndPoint
20                                                    , int timeout ) { 
21              if( AbstractDelegate.isTestDelegateRequired(targetEndPoint) ) {
22                   return new TestJobMonitorDelegateImpl();
23              } else {
24                  return new JobMonitorDelegateImpl(targetEndPoint, timeout ) ;
25              }   
26      }       
27      
28  
29    
30  
31  } // end of class JobMonitorDelegate