Example usage for org.apache.hadoop.registry.client.binding RegistryTypeUtils inetAddrEndpoint

List of usage examples for org.apache.hadoop.registry.client.binding RegistryTypeUtils inetAddrEndpoint

Introduction

In this page you can find the example usage for org.apache.hadoop.registry.client.binding RegistryTypeUtils inetAddrEndpoint.

Prototype


public static Endpoint inetAddrEndpoint(String api, String protocolType, String hostname, int port) 

Source Link

Document

Create an internet address endpoint from a list of URIs

Usage

From source file:org.apache.slider.server.appmaster.state.RoleInstance.java

License:Apache License

/**
 * Register a port endpoint as an inet-addr formatted endpoint, using the
 * hostname as the first part of the address
 * @param port port port//from   ww  w  . j  av  a2 s  . co m
 * @param api  API API name
 */
public void registerPortEndpoint(int port, String api) {
    Endpoint epr = RegistryTypeUtils.inetAddrEndpoint(api, ProtocolTypes.PROTOCOL_TCP, host, port);
    addEndpoint(epr);
}