Examples of ServerPort


Examples of org.apache.accumulo.server.util.TServerUtils.ServerPort

    int port = random.nextInt(30000) + 2000;
   
    TransactionWatcher watcher = new TransactionWatcher();
    final ThriftClientHandler tch = new ThriftClientHandler(watcher);
    TabletClientService.Processor processor = new TabletClientService.Processor(tch);
    ServerPort serverPort = TServerUtils.startTServer(port, processor, "ZombieTServer", "walking dead", 2, 1000);
   
    InetSocketAddress addr = new InetSocketAddress(InetAddress.getLocalHost(), serverPort.port);
    String addressString = AddressUtil.toString(addr);
    String zPath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZTSERVERS + "/" + addressString;
    ZooReaderWriter zoo = ZooReaderWriter.getInstance();
View Full Code Here

Examples of org.apache.accumulo.server.util.TServerUtils.ServerPort

      }
    };
    writer = (MutationLogger.Iface) Proxy.newProxyInstance(MutationLogger.Iface.class.getClassLoader(), new Class[] {MutationLogger.Iface.class}, h);
    // Create the thrift-based logging service
    MutationLogger.Processor processor = new MutationLogger.Processor(TraceWrap.service(this));
    ServerPort sp = TServerUtils.startServer(Property.LOGGER_PORT, processor, this.getClass().getSimpleName(), "Logger Client Service Handler",
        Property.LOGGER_PORTSEARCH, Property.LOGGER_MINTHREADS, Property.LOGGER_THREADCHECK);
    service = sp.server;
    InetSocketAddress address = new InetSocketAddress(Accumulo.getLocalAddress(args), sp.port);
    addressString = AddressUtil.toString(address);
    registerInZooKeeper(Constants.ZLOGGERS);
View Full Code Here

Examples of org.eclipse.wst.server.core.ServerPort

   *
   * @see org.eclipse.wst.server.core.model.ServerDelegate#getServerPorts()
   */
  public ServerPort[] getServerPorts() {
    List<ServerPort> ports = new ArrayList<ServerPort>();
    ports.add(new ServerPort(PROPERTY_HTTP_PORT, "Web Connector", Integer.parseInt(getHTTPPort()), "http"));
    ports.add(new ServerPort(PROPERTY_RMI_PORT, "RMI Naming", Integer.parseInt(getRMINamingPort()), "rmi"));
    return (ServerPort[]) ports.toArray(new ServerPort[ports.size()]);
  }
View Full Code Here

Examples of org.eclipse.wst.server.core.ServerPort

    viewer.setCellEditors(new CellEditor[] { null,
        new TextCellEditor(ports) });

    ICellModifier cellModifier = new ICellModifier() {
      public Object getValue(Object element, String property) {
        ServerPort sp = (ServerPort) element;
        return sp.getPort() + "";
      }

      public boolean canModify(Object element, String property) {
        return "port".equals(property);
      }

      public void modify(Object element, String property, Object value) {
        Item item = (Item) element;
        ServerPort sp = (ServerPort) item.getData();
        GeronimoServerDelegate gs = getGeronimoServer();
        gs.setInstanceProperty(sp.getId(), (String) value);
        changePortNumber(sp.getId(), Integer.parseInt((String) value));
      }
    };

    viewer.setCellModifier(cellModifier);
  }
View Full Code Here

Examples of org.eclipse.wst.server.core.ServerPort

  private void fillTable(Table ports) {
    ServerPort[] serverPorts = getServer().getServerPorts(null);
    if (serverPorts != null) {
      for (int i = 0; i < serverPorts.length; i++) {
        ServerPort port = serverPorts[i];
        TableItem item = new TableItem(ports, SWT.NONE);
        String[] s = new String[] { port.getName(),
            Integer.toString(port.getPort()) };
        item.setText(s);
        item.setImage(Activator.getImage(Activator.IMG_PORT));
        item.setData(port);
      }
    }
View Full Code Here

Examples of org.eclipse.wst.server.core.ServerPort

  protected void changePortNumber(String id, int port) {
    TableItem[] items = ports.getItems();
    int size = items.length;
    for (int i = 0; i < size; i++) {
      ServerPort sp = (ServerPort) items[i].getData();
      if (sp.getId().equals(id)) {
        items[i].setData(new ServerPort(id, sp.getName(), port, sp.getProtocol()));
        items[i].setText(1, port + "");
        return;
      }
    }
  }
View Full Code Here

Examples of org.eclipse.wst.server.core.ServerPort

    if (!SocketUtil.isLocalhost(getServer().getHost()))
      return;

    ServerPort[] ports = getServer().getServerPorts(null);
    for (int i = 0; i < ports.length; i++) {
      ServerPort sp = ports[i];
      if (SocketUtil.isPortInUse(ports[i].getPort(), 5))
        throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0, Messages.bind(Messages.errorPortInUse, Integer.toString(sp.getPort()), sp.getName()), null));
    }

    stopUpdateServerStateTask();
    setServerState(IServer.STATE_STARTING);
    setMode(launchMode);
View Full Code Here

Examples of org.jivesoftware.openfire.ServerPort

    private void createServerListener(String localIPAddress) {
        // Start servers socket unless it's been disabled.
        if (isServerListenerEnabled()) {
            int port = getServerListenerPort();
            try {
                serverSocketThread = new SocketAcceptThread(this, new ServerPort(port, serverName,
                        localIPAddress, false, null, ServerPort.Type.server));
                ports.add(serverSocketThread.getServerPort());
                serverSocketThread.setDaemon(true);
                serverSocketThread.setPriority(Thread.MAX_PRIORITY);
            }
View Full Code Here

Examples of org.jivesoftware.openfire.ServerPort

                    }
                }
                // Start accepting connections
                multiplexerSocketAcceptor.bind(new InetSocketAddress(bindInterface, port), new MultiplexerConnectionHandler(serverName));

                ports.add(new ServerPort(port, serverName, localIPAddress, false, null, ServerPort.Type.connectionManager));

                List<String> params = new ArrayList<String>();
                params.add(Integer.toString(port));
                Log.info(LocaleUtils.getLocalizedString("startup.multiplexer", params));
            }
View Full Code Here

Examples of org.jivesoftware.openfire.ServerPort

                }
                // Start accepting connections
                componentAcceptor
                        .bind(new InetSocketAddress(bindInterface, port), new ComponentConnectionHandler(serverName));

                ports.add(new ServerPort(port, serverName, localIPAddress, false, null, ServerPort.Type.component));

                List<String> params = new ArrayList<String>();
                params.add(Integer.toString(port));
                Log.info(LocaleUtils.getLocalizedString("startup.component", params));
            }
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.