public List<EndpointHandle> bind(String bindAddress,Endpoint endpointAddress) throws ServiceResultException {
  List<EndpointHandle> result=new ArrayList<EndpointHandle>();
  String scheme=UriUtil.getTransportProtocol(bindAddress);
  List<SocketAddress> socketAddresses=EndpointUtil.toSocketAddresses(bindAddress);
  if (socketAddresses.isEmpty())   return Collections.emptyList();
  EndpointServer endpointServer=application.getOrCreateEndpointServer(scheme);
  for (  SocketAddress socketAddress : socketAddresses) {
    EndpointBinding eb=new EndpointBinding(endpointServer,endpointAddress,this);
    EndpointHandle handle=endpointServer.bind(socketAddress,eb);
    boundHandles.add(handle);
  }
  return result;
}

public List < EndpointHandle > bind ( String bindAddress , Endpoint endpointAddress ) throws ServiceResultException { List < EndpointHandle > result = new ArrayList < EndpointHandle > ( ) ; String scheme = UriUtil . getTransportProtocol ( bindAddress ) ; List < SocketAddress > socketAddresses = EndpointUtil . toSocketAddresses ( bindAddress ) ; if ( socketAddresses . isEmpty ( ) ) return Collections . emptyList ( ) ; EndpointServer endpointServer = application . getOrCreateEndpointServer ( scheme ) ; for ( SocketAddress socketAddress : socketAddresses ) { EndpointBinding eb = new EndpointBinding ( endpointServer , endpointAddress , this ) ; EndpointHandle handle = endpointServer . bind ( socketAddress , eb ) ; boundHandles . add ( handle ) ; } return result ; }
bind an endpoint to the server . bindaddress is resolved into ip - addresses . for instance , if " localhost " is used , then all local interface ips are bound . if port is not explicitly specified , the default port for the protocol is used . there must be protocol : " opc . tcp " , " http " , or " https " . endpointuri is the identifier of the endpoint .
