Example usage for java.rmi.registry Registry lookup

List of usage examples for java.rmi.registry Registry lookup

Introduction

In this page you can find the example usage for java.rmi.registry Registry lookup.

Prototype

public Remote lookup(String name) throws RemoteException, NotBoundException, AccessException;

Source Link

Document

Returns the remote reference bound to the specified name in this registry.

Usage

From source file:org.ut.biolab.medsavant.MedSavantClient.java

private static void setAdaptersFromRegistry(Registry registry)
        throws RemoteException, NotBoundException, NoRouteToHostException, ConnectIOException {
    CustomTablesAdapter CustomTablesManager;
    AnnotationManagerAdapter AnnotationManagerAdapter;
    CohortManagerAdapter CohortManager;// w  w  w  .j av  a  2 s.  c  o  m
    GeneSetManagerAdapter GeneSetManager;
    LogManagerAdapter LogManager;
    NetworkManagerAdapter NetworkManager;
    OntologyManagerAdapter OntologyManager;
    PatientManagerAdapter PatientManager;
    ProjectManagerAdapter ProjectManager;
    UserManagerAdapter UserManager;
    SessionManagerAdapter SessionManager;
    SettingsManagerAdapter SettingsManager;
    RegionSetManagerAdapter RegionSetManager;
    ReferenceManagerAdapter ReferenceManager;
    DBUtilsAdapter DBUtils;
    SetupAdapter SetupManager;
    VariantManagerAdapter VariantManager;
    NotificationManagerAdapter NotificationManager;

    //   try {
    AnnotationManagerAdapter = (AnnotationManagerAdapter) registry.lookup(ANNOTATION_MANAGER);
    CohortManager = (CohortManagerAdapter) (registry.lookup(COHORT_MANAGER));
    LogManager = (LogManagerAdapter) registry.lookup(LOG_MANAGER);
    NetworkManager = (NetworkManagerAdapter) registry.lookup(NETWORK_MANAGER);
    OntologyManager = (OntologyManagerAdapter) registry.lookup(ONTOLOGY_MANAGER);
    PatientManager = (PatientManagerAdapter) registry.lookup(PATIENT_MANAGER);
    ProjectManager = (ProjectManagerAdapter) registry.lookup(PROJECT_MANAGER);
    GeneSetManager = (GeneSetManagerAdapter) registry.lookup(GENE_SET_MANAGER);
    ReferenceManager = (ReferenceManagerAdapter) registry.lookup(REFERENCE_MANAGER);
    RegionSetManager = (RegionSetManagerAdapter) registry.lookup(REGION_SET_MANAGER);
    SessionManager = (SessionManagerAdapter) registry.lookup(SESSION_MANAGER);
    SettingsManager = (SettingsManagerAdapter) registry.lookup(SETTINGS_MANAGER);
    UserManager = (UserManagerAdapter) registry.lookup(USER_MANAGER);
    VariantManager = (VariantManagerAdapter) registry.lookup(VARIANT_MANAGER);
    DBUtils = (DBUtilsAdapter) registry.lookup(DB_UTIL_MANAGER);
    SetupManager = (SetupAdapter) registry.lookup(SETUP_MANAGER);
    CustomTablesManager = (CustomTablesAdapter) registry.lookup(CUSTOM_TABLES_MANAGER);
    NotificationManager = (NotificationManagerAdapter) registry.lookup(NOTIFICATION_MANAGER);

    if (Thread.interrupted()) {
        return;
    }

    synchronized (managerLock) {
        MedSavantClient.CustomTablesManager = CustomTablesManager;
        MedSavantClient.AnnotationManagerAdapter = AnnotationManagerAdapter;
        MedSavantClient.CohortManager = CohortManager;
        MedSavantClient.GeneSetManager = GeneSetManager;
        MedSavantClient.LogManager = LogManager;
        MedSavantClient.NetworkManager = NetworkManager;
        MedSavantClient.OntologyManager = OntologyManager;
        MedSavantClient.PatientManager = PatientManager;
        MedSavantClient.ProjectManager = ProjectManager;
        MedSavantClient.UserManager = UserManager;
        MedSavantClient.SessionManager = SessionManager;
        MedSavantClient.SettingsManager = SettingsManager;
        MedSavantClient.RegionSetManager = RegionSetManager;
        MedSavantClient.ReferenceManager = ReferenceManager;
        MedSavantClient.DBUtils = DBUtils;
        MedSavantClient.SetupManager = SetupManager;
        MedSavantClient.VariantManager = VariantManager;
        MedSavantClient.NotificationManager = NotificationManager;

        initProxies();
    }
}

From source file:org.ut.biolab.medsavant.MedSavantServlet.java

private void setAdaptersFromRegistry(Registry registry)
        throws RemoteException, NotBoundException, NoRouteToHostException, ConnectIOException {
    this.annotationManager = (AnnotationManagerAdapter) registry.lookup(ANNOTATION_MANAGER);
    this.cohortManager = (CohortManagerAdapter) (registry.lookup(COHORT_MANAGER));
    this.logManager = (LogManagerAdapter) registry.lookup(LOG_MANAGER);
    this.networkManager = (NetworkManagerAdapter) registry.lookup(NETWORK_MANAGER);
    this.ontologyManager = (OntologyManagerAdapter) registry.lookup(ONTOLOGY_MANAGER);
    this.patientManager = (PatientManagerAdapter) registry.lookup(PATIENT_MANAGER);
    this.projectManager = (ProjectManagerAdapter) registry.lookup(PROJECT_MANAGER);
    this.geneSetManager = (GeneSetManagerAdapter) registry.lookup(GENE_SET_MANAGER);
    this.referenceManager = (ReferenceManagerAdapter) registry.lookup(REFERENCE_MANAGER);
    this.regionSetManager = (RegionSetManagerAdapter) registry.lookup(REGION_SET_MANAGER);
    this.sessionManager = (SessionManagerAdapter) registry.lookup(SESSION_MANAGER);
    this.settingsManager = (SettingsManagerAdapter) registry.lookup(SETTINGS_MANAGER);
    this.userManager = (UserManagerAdapter) registry.lookup(USER_MANAGER);
    this.variantManager = (VariantManagerAdapter) registry.lookup(VARIANT_MANAGER);
    this.dbUtils = (DBUtilsAdapter) registry.lookup(DB_UTIL_MANAGER);
    this.setupManager = (SetupAdapter) registry.lookup(SETUP_MANAGER);
    this.customTablesManager = (CustomTablesAdapter) registry.lookup(CUSTOM_TABLES_MANAGER);
    this.notificationManager = (NotificationManagerAdapter) registry.lookup(NOTIFICATION_MANAGER);
    this.jsonUtilities = new JSONUtilities(variantManager, annotationManager);
}