Examples of bind()


Examples of java.nio.channels.ServerSocketChannel.bind()

      server.configureBlocking(false);
      InetSocketAddress bind = new InetSocketAddress(MainHandler
          .getCurrentInstance().getProperty(BINKD_BIND, "0.0.0.0"),
          MainHandler.getCurrentInstance().getIntegerProperty(
              BINKD_PORT, 24554));
      server.bind(bind, 5);
      logger.l1("We are listening on " + bind.getHostString() + ":"
          + bind.getPort());
      Selector selector = Selector.open();
      server.register(selector, server.validOps());
      while (true) {
View Full Code Here

Examples of java.nio.channels.SocketChannel.bind()

            channel = SocketChannel.open();
            HttpDestination destination = (HttpDestination)context.get(HTTP_DESTINATION_CONTEXT_KEY);
            HttpClient client = destination.getHttpClient();
            SocketAddress bindAddress = client.getBindAddress();
            if (bindAddress != null)
                channel.bind(bindAddress);
            configure(client, channel);
            channel.configureBlocking(false);
            channel.connect(address);

            context.put(SslClientConnectionFactory.SSL_PEER_HOST_CONTEXT_KEY, destination.getHost());
View Full Code Here

Examples of java.rmi.registry.Registry.bind()

      // try to bind first
      try
      {
         registry = LocateRegistry.getRegistry(DEFAULT_REGISTRY_PORT);
         registry.bind(RMI_SERVER_PREFIX + serverIndex, testServer);
         registry.bind(NAMING_SERVER_PREFIX + serverIndex, testServer.getNamingDelegate());

      }
      catch(Exception e)
      {
View Full Code Here

Examples of javafx.beans.property.BooleanProperty.bind()


    @Override
    public void initialize(URL url, ResourceBundle resourceBundle) {
        BooleanProperty urlEntered = new SimpleBooleanProperty();
        urlEntered.bind(urlTextField.textProperty().isNotEmpty());
        BooleanProperty userNameEntered = new SimpleBooleanProperty();
        userNameEntered.bind(urlTextField.textProperty().isNotEmpty());
        BooleanProperty passwordEntered = new SimpleBooleanProperty();
        passwordEntered.bind(passwordTextField.textProperty().isNotEmpty());
        saveButton.disableProperty().bind(urlEntered.and(userNameEntered).and(passwordEntered).not());
View Full Code Here

Examples of javafx.beans.property.SimpleBooleanProperty.bind()


    @Override
    public void initialize(URL url, ResourceBundle resourceBundle) {
        BooleanProperty urlEntered = new SimpleBooleanProperty();
        urlEntered.bind(urlTextField.textProperty().isNotEmpty());
        BooleanProperty userNameEntered = new SimpleBooleanProperty();
        userNameEntered.bind(urlTextField.textProperty().isNotEmpty());
        BooleanProperty passwordEntered = new SimpleBooleanProperty();
        passwordEntered.bind(passwordTextField.textProperty().isNotEmpty());
        saveButton.disableProperty().bind(urlEntered.and(userNameEntered).and(passwordEntered).not());
View Full Code Here

Examples of javafx.beans.property.SimpleStringProperty.bind()

  private final ObjectProperty<ResourceBundle> resourceBundle = new SimpleObjectProperty<ResourceBundle>();

  @Override
  public StringProperty getString(final Element element, final NodeType nodeType) {
    SimpleStringProperty string = new SimpleStringProperty();
    string.bind(new StringBinding() {

      {
        bind(resourceBundle);
      }
View Full Code Here

Examples of javango.contrib.hibernate.ModelForm.bind()

      context.put("form_url", String.format("%s/%s", request.getContext(), request.getPath()));
     
      Map<String, String[]> searchParams = new HashMap<String, String[]>(request.getParameterMap());
      if (searchParams.containsKey("page")) searchParams.remove("page");
      if (searchParams.containsKey("prompt_data")) searchParams.remove("prompt_data");
      form.bind(request.getParameterMap());
      if (form.isValid()) {
        int page;
        try {
          page = new Integer(request.getParameter("page"));
        } catch (NumberFormatException e) {
View Full Code Here

Examples of javango.forms.Form.bind()

    }
   

   
    if ("POST".equals(request.getMethod())) {
      form.bind(request.getParameterMap());
      if (form.isValid()) {
        // TODO better way to get the relative 'admin' part of the url
        Map<String, String> params = new HashMap<String, String>();
        generateSearchParams(request, params);
        return new HttpResponseRedirect("../", params);
View Full Code Here

Examples of javango.polls.forms.VoteForm.bind()

 
  public HttpResponse vote(HttpRequest request, Long poll_id) throws HttpException {
    Poll p = javango.getObjectOr404(Poll.class, poll_id);
   
    VoteForm form = javango.newForm(VoteForm.class).setPoll(p);
    form.bind(request.getParameterMap());     
   
    if (!form.isValid()) {
      Map<String, Object> context = new HashMap<String, Object>();
      context.put("poll", p);
      context.put("error_message", "You didn't select a valid choice");
View Full Code Here

Examples of javax.naming.Context.bind()

      cache.getConfiguration().setCacheLoaderConfig(getCacheLoaderConfig(props));
      cache.create();


      MockDataSource ds = new MockDataSource(props);
      context.bind(JNDI_NAME, ds);
      assertNotNull(JNDI_NAME + " bound", context.lookup(JNDI_NAME));
      cache.start();

      assertNotNull("Cache has a cache loader", cache.getCacheLoaderManager().getCacheLoader());
   }
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.