Package ch.ethz.inf.vs.californium.network

Examples of ch.ethz.inf.vs.californium.network.Endpoint


   * Binds the server to a ephemeral port on the specified address.
   *
   * @param address the address
   */
  private void bind(InetSocketAddress address) {
    Endpoint endpoint = new CoAPEndpoint(address, this.config);
    addEndpoint(endpoint);
  }
View Full Code Here


    return endpoints;
  }

  @Override
  public Endpoint getEndpoint(InetSocketAddress address) {
    Endpoint endpoint = null;

    for (Endpoint ep : endpoints) {
      if (ep.getAddress().equals(address)) {
        endpoint = ep;
        break;
View Full Code Here

    return endpoint;
  }

  @Override
  public Endpoint getEndpoint(int port) {
    Endpoint endpoint = null;

    for (Endpoint ep : endpoints) {
      if (ep.getAddress().getPort() == port) {
        endpoint = ep;
      }
View Full Code Here

    managedServer = serverFactory.newServer(networkConfig);
   
    // add secure endpoint if configured
    int securePort = networkConfig.getInt(NetworkConfigDefaults.PROPERTY_DEFAULT_COAPS_PORT);
    if ( securePort > 0 ) {
      Endpoint secureEndpoint = endpointFactory.getSecureEndpoint(
          networkConfig, new InetSocketAddress((InetAddress) null, securePort));
      if (secureEndpoint != null) {
        LOGGER.fine("Adding secure endpoint on address " + secureEndpoint.getAddress());
        managedServer.addEndpoint(secureEndpoint);
      } else {
        LOGGER.warning("Secure endpoint has been configured in server properties but EndpointFactory does not support creation of secure Endpoints");
      }
View Full Code Here

  }

  @Override
  public final Endpoint getSecureEndpoint(NetworkConfig config, InetSocketAddress address) {

    Endpoint endpoint = null;
    if (secureConnectorFactory != null) {
      endpoint = new CoAPEndpoint(
          secureConnectorFactory.newConnector(address),
          config);
    } else {
View Full Code Here

TOP

Related Classes of ch.ethz.inf.vs.californium.network.Endpoint

Copyright © 2018 www.massapicom. 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.