Ejemplo n.º 1
0
  /**
   * Connect the manager to a remote repository.
   *
   * @param ior_url an url pointing to the IOR file of a remote repository.
   */
  public void connectTo(String ior_url) {
    try {
      m_admin = AdminHelper.narrow(m_orb.resolve_initial_references("ImplementationRepository"));
    } catch (org.omg.CORBA.ORBPackage.InvalidName in) {
      if (logger.isWarnEnabled()) logger.warn("Could not contact Impl. Repository!");
      return;
    }

    fetchImRInfo();

    m_top_node.setUserObject(m_imr_info);

    fetchServers();

    setRefreshInterval(m_current_refresh_interval);
  }
Ejemplo n.º 2
0
  /** The constructor. Connects to default repository and fetches the servers. */
  public ImRModel() {
    m_orb = (org.jacorb.orb.ORB) org.omg.CORBA.ORB.init(new String[0], null);
    configuration = m_orb.getConfiguration();
    logger = configuration.getLogger("org.jacorb.imr.model");

    try {
      m_admin = AdminHelper.narrow(m_orb.resolve_initial_references("ImplementationRepository"));
    } catch (org.omg.CORBA.ORBPackage.InvalidName in) {
      if (logger.isWarnEnabled()) logger.warn("Could not contact Impl. Repository!");
      return;
    }

    fetchImRInfo();

    m_top_node = new DefaultMutableTreeNode(m_imr_info);
    m_tree_model = new DefaultTreeModel(m_top_node, false);
    m_tree = new JTree(m_tree_model);

    m_server_model = new ImRServerTableModel(this);
    m_poa_model = new ImRPOATableModel();

    m_server_names = new Hashtable();

    m_server_nodes = new Vector();
    m_poa_nodes = new Vector();

    m_host_names = new Hashtable();
    m_host_selector_model = new DefaultComboBoxModel();
    m_host_selector = new JComboBox(m_host_selector_model);
    m_host_selector.setEditable(true);

    fetchServers();
    m_tree.expandRow(0);

    m_refresh_thread = new RefreshThread(m_current_refresh_interval);
  }