Examples of HostModel


Examples of netWorking.HostModel

      if (o instanceof ClientModel) {
        ClientModel c = (ClientModel) o;
        currentPane = new NetworkTankView(this, 1, c);
      }
      if (o instanceof HostModel) {
        HostModel c = (HostModel) o;
        currentPane = new NetworkTankView(this, 0, c);
      }

      System.out.println("changeview with o:" + o);
      body.removeAll();
      body.add(currentPane, "NETWORKTANKVIEW");
      CardLayout c1 = (CardLayout) body.getLayout();
      c1.show(body, "NETWORKTANKVIEW");
      for (Component co : body.getComponents()) {
        if (co == currentPane) {
          currentPane.requestFocusInWindow();
        }
      }
      this.setBackground(Color.black);
      this.setSize(1180, 750);
      this.setLocationRelativeTo(null);
      // this.setExtendedState(this.MAXIMIZED_BOTH);

      break;

    case LAN:
      this.setBackground(Color.white);
      previousPane = currentPane;
      currentPane = new LanView(this);
      body.removeAll();
      body.add(currentPane, "LAN");
      this.setLocationRelativeTo(null);
      this.setSize(650, 400);
      break;

    case PREVIOUS:

      JPanel temp = previousPane;
      previousPane = currentPane;
      currentPane = temp;
      if (currentPane instanceof LanView)
        changeView(Views.LAN, null);
      if (currentPane instanceof TitleView)
        changeView(Views.TITLE, null);
      if (currentPane instanceof TankView)
        changeView(Views.TANKVIEW, null);

      body.removeAll();
      body.add(currentPane, v.name());
      if (currentPane instanceof TitleView) {
        this.setLocation(50, 50);
        this.setSize(640, 600);
      }
      repaint();
      break;
    case TANKVIEW:
      if (currentLevel == 1) {
        currentPane = new TankView(this, new Level1());
      }
      if (currentLevel == 2) {
        currentPane = new TankView(this, new Level2());
      }
      if (currentLevel == 3) {
        currentPane = new TankView(this, new Level3());
      }
      if (currentLevel == 4) {
        currentPane = new TankView(this, new Level4());
      }
      if (currentLevel == 5) {
        currentPane = new TankView(this, new Level5());
      }

      body.add(currentPane, "TANKVIEW");
      CardLayout c = (CardLayout) body.getLayout();
      c.show(body, "TANKVIEW");
      for (Component co : body.getComponents()) {
        if (co == currentPane) {
          currentPane.requestFocusInWindow();
        }
      }
View Full Code Here

Examples of netWorking.HostModel

    super(m);
    buildMain();
    buildHostPanel();
    buildClientPanel();
    this.setVisible(true);
    if(!(o instanceof HostModel))  hm = new HostModel(this, m);
    else {
      hm = (HostModel)o;
      hm.setHostView(this);
      System.out.println("hm refered?");
    }
View Full Code Here

Examples of org.jboss.as.model.HostModel

                }
            })
            .addAliases(DomainControllerConnection.SERVICE_NAME)
            .setInitialMode(ServiceController.Mode.ACTIVE);

        HostModel hostConfig = getHostModel();
        final RemoteDomainControllerElement remoteDomainControllerElement = hostConfig.getRemoteDomainControllerElement();
        final InetAddress hostAddress;
        try {
            hostAddress = InetAddress.getByName(remoteDomainControllerElement.getHost());
        } catch (UnknownHostException e) {
            throw new RuntimeException("Failed to get remote domain controller address", e);
        }
        serviceBuilder.addInjection(domainControllerClientService.getDomainControllerAddressInjector(), hostAddress);
        serviceBuilder.addInjection(domainControllerClientService.getDomainControllerPortInjector(), remoteDomainControllerElement.getPort());

        final ManagementElement managementElement = hostConfig.getManagementElement();
        serviceBuilder.addDependency(NetworkInterfaceService.JBOSS_NETWORK_INTERFACE.append(managementElement.getInterfaceName()), NetworkInterfaceBinding.class, domainControllerClientService.getLocalManagementInterfaceInjector());
        serviceBuilder.addInjection(domainControllerClientService.getLocalManagementPortInjector(), managementElement.getPort());
        serviceBuilder.addDependency(SERVICE_NAME_BASE.append("executor"), ScheduledExecutorService.class, domainControllerClientService.getExecutorServiceInjector());
        serviceBuilder.addDependency(SERVICE_NAME_BASE.append("thread-factory"), ThreadFactory.class, domainControllerClientService.getThreadFactoryInjector());
    }
View Full Code Here

Examples of org.jboss.as.model.HostModel

    }

    private void activateManagementCommunication(final ServiceActivatorContext serviceActivatorContext) {
        final BatchBuilder batchBuilder = serviceActivatorContext.getBatchBuilder();

        HostModel hostConfig = getHostModel();
        final ManagementElement managementElement = hostConfig.getManagementElement();
        if(managementElement == null) {
            throw new IllegalStateException("null management configuration");
        }
        final Set<InterfaceElement> hostInterfaces = hostConfig.getInterfaces();
        if(hostInterfaces != null) {
            for(InterfaceElement interfaceElement : hostInterfaces) {
                if(interfaceElement.getName().equals(managementElement.getInterfaceName())) {
                    interfaceElement.activate(serviceActivatorContext);
                    break;
View Full Code Here

Examples of org.jboss.as.model.HostModel

    void startServers() {
        if(serversStarted.compareAndSet(false, true)) {
            if (!environment.isRestart()) {
                synchronizeDeployments();
                HostModel hostConfig = getHostModel();
                for (ServerElement serverEl : hostConfig.getServers()) {
                    // TODO take command line input on what servers to start
                    if (serverEl.isStart()) {
                        String serverName = serverEl.getName();
                        log.info("Starting server " + serverName);
                        try {
View Full Code Here

Examples of org.jboss.as.model.HostModel

        try {
            final List<AbstractHostModelUpdate<?>> hostUpdates = new ArrayList<AbstractHostModelUpdate<?>>();
            final XMLMapper mapper = XMLMapper.Factory.create();
            extensionRegistrar.registerStandardHostReaders(mapper);
            mapper.parseDocument(hostUpdates, XMLInputFactory.newInstance().createXMLStreamReader(new BufferedInputStream(configPersister.getConfigurationInputStream())));
            final HostModel hostModel = new HostModel();
            for(final AbstractHostModelUpdate<?> update : hostUpdates) {
                hostModel.update(update);
            }
            return hostModel;
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
View Full Code Here

Examples of org.jboss.as.model.HostModel

        @Override
        protected HostModel receiveResponse(InputStream input) throws IOException {
            final Unmarshaller unmarshaller = getUnmarshaller();
            unmarshaller.start(createByteInput(input));
            HostModel hm = unmarshal(unmarshaller, HostModel.class);
            unmarshaller.finish();
            return hm;
        }
View Full Code Here

Examples of org.jboss.as.model.HostModel

        @Override
        protected final HostModel receiveResponse(final InputStream input) throws IOException {
            final Unmarshaller unmarshaller = getUnmarshaller();
            unmarshaller.start(createByteInput(input));
            expectHeader(unmarshaller, DomainClientProtocol.RETURN_HOST_MODEL);
            final HostModel hostModel = unmarshal(unmarshaller, HostModel.class);
            unmarshaller.finish();
            return hostModel;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.