1 24 25 26 package org.objectweb.clif.analyser.lib; 27 28 import java.util.Iterator ; 29 import java.io.Serializable ; 30 import org.objectweb.fractal.api.NoSuchInterfaceException; 31 import org.objectweb.fractal.api.Interface; 32 import org.objectweb.clif.storage.api.StorageRead; 33 import org.objectweb.clif.analyser.api.AnalyserControl; 34 import org.objectweb.fractal.api.control.BindingController; 35 36 46 47 48 public class AnalyserImpl implements AnalyserControl, BindingController 49 { 50 51 52 53 57 58 59 60 private StorageRead srItf; 61 62 63 private String [] interfaceNamesCache = null; 64 65 66 67 71 72 public Object lookupFc(String clientItfName) 73 { 74 if (clientItfName.equals(StorageRead.STORAGE_READ)) 75 { 76 return srItf; 77 } 78 else 79 { 80 return null; 81 } 82 } 83 84 85 public synchronized void bindFc(String clientItfName, Object serverItf) 86 { 87 if (clientItfName.equals(StorageRead.STORAGE_READ)) 88 { 89 srItf = (StorageRead) serverItf; 90 interfaceNamesCache = null; 91 } 92 } 93 94 95 public synchronized void unbindFc(String clientItfName) 96 { 97 if (clientItfName.equals(StorageRead.STORAGE_READ)) 98 { 99 srItf = null; 100 interfaceNamesCache = null; 101 } 102 } 103 104 105 public synchronized String [] listFc() 106 { 107 if (interfaceNamesCache == null) 108 { 109 interfaceNamesCache = new String [(srItf == null ? 0 : 1)]; 110 if (srItf != null) 111 { 112 interfaceNamesCache[0] = StorageRead.STORAGE_READ; 113 } 114 } 115 return interfaceNamesCache; 116 } 117 118 119 120 130 public void getView(String nameOfTheView,String testId,String nameOfInjector,int numthread,int paramX,int paramY,long begindate, long enddate) 131 { 132 System.out.println("AnalyserImpl\n"); 133 } 135 136 137 138 } 139 | Popular Tags |