public ImportLibrary( OMEROMetadataStoreClient client, OMEROWrapper reader, FileTransfer transfer, List<FileExclusion> exclusions, int minutesToWait) { if (client == null || reader == null) { throw new NullPointerException("All arguments to ImportLibrary() must be non-null."); } this.store = client; this.transfer = transfer; if (exclusions != null) { this.exclusions.addAll(exclusions); } this.minutesToWait = minutesToWait; repo = lookupManagedRepository(); // Adapter which should be used for callbacks. This is more // complicated than it needs to be at the moment. We're only sure that // the OMSClient has a ServiceFactory (and not necessarily a client) // so we have to inspect various fields to get the adapter. sf = store.getServiceFactory(); oa = sf.ice_getConnection().getAdapter(); final Ice.Communicator ic = oa.getCommunicator(); category = omero.client.getRouter(ic).getCategoryForClient(); }