congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ListenerEndpoint
Code IndexAdd Tabnine to your IDE (free)

How to use
ListenerEndpoint
in
org.apache.http.nio.reactor

Best Java code snippets using org.apache.http.nio.reactor.ListenerEndpoint (Showing top 14 results out of 315)

origin: wso2/wso2-synapse

  if (listenerEndpoint.getAddress() instanceof InetSocketAddress) {
    int endPointPort = ((InetSocketAddress) listenerEndpoint.getAddress()).getPort();
    if (dynamicPTTListeningEndpointMapper.containsKey(endPointPort)) {
      continue;
      if (inetSocketAddress.getHostName().equalsIgnoreCase(((InetSocketAddress) listenerEndpoint.getAddress()).getHostName())) {
        listenerEndpoint.close();
for (ListenerEndpoint listenerEndpoint : endpoints) {
  for (InetSocketAddress inetSocketAddress : bindAddresses) {
    if (inetSocketAddress.getHostName().equalsIgnoreCase(((InetSocketAddress) listenerEndpoint.getAddress()).getHostName())) {
      listenerEndpoint.close();
origin: ibinti/bugvm

@Override
public Set<ListenerEndpoint> getEndpoints() {
  final Set<ListenerEndpoint> set = new HashSet<ListenerEndpoint>();
  synchronized (this.endpoints) {
    final Iterator<ListenerEndpointImpl> it = this.endpoints.iterator();
    while (it.hasNext()) {
      final ListenerEndpoint endpoint = it.next();
      if (!endpoint.isClosed()) {
        set.add(endpoint);
      } else {
        it.remove();
      }
    }
  }
  return set;
}
origin: wso2/wso2-synapse

private ListenerEndpoint startEndpoint(InetSocketAddress inetSocketAddress,
                    ListeningIOReactor defaultListeningIOReactor, String endPointName)
    throws Exception {
  ListenerEndpoint endpoint = defaultListeningIOReactor.listen(inetSocketAddress);
  try {
    endpoint.waitFor();
    InetSocketAddress address = (InetSocketAddress) endpoint.getAddress();
    if (!address.isUnresolved()) {
      log.info((endPointName != null ? "Pass-through " + endPointName : " Pass-through Http ") +
           " Listener started on " + address.getHostName() + ":" + address.getPort());
    } else {
      log.info((endPointName != null ? "Pass-through " + endPointName : " Pass-through Http ") +
           " Listener started on " + address);
    }
  } catch (Exception e) {
    throw new Exception("Endpoint does not start for port " + inetSocketAddress.getPort() +
              "May be IO Reactor not started or endpoint binding exception ", e);
  }
  return endpoint;
}
origin: OPCFoundation/UA-Java-Legacy

void close() {
  for ( HttpsEndpointHandle eph : endpoints.values() ) eph.close__();
  socketHandles.remove(getSocketAddress());
  if (listenerEndpoint != null)
    listenerEndpoint.close();
}
@Override
origin: wso2/wso2-synapse

try {
  log.info("Closing Endpoint Listener for port "+port);
  dynamicPTTListeningEndpointMapper.get(port).close();
} catch (Exception e) {
  log.error("Cannot close  Endpoint relevant to port " + port, e);
origin: wso2/wso2-synapse

ListenerEndpoint endpoint = endpoints.remove();
try {
  endpoint.waitFor();
  if (log.isInfoEnabled()) {
    InetSocketAddress address = (InetSocketAddress) endpoint.getAddress();
    if (!address.isUnresolved()) {
      log.info(name + " started on " + address.getHostName() + ":" + address.getPort());
origin: wso2/wso2-synapse

  if (listenerEndpoint.getAddress() instanceof InetSocketAddress) {
    int endPointPort = ((InetSocketAddress) listenerEndpoint.getAddress()).getPort();
    if (dynamicPTTListeningEndpointMapper.containsKey(endPointPort)) {
      continue;
    listenerEndpoint.close();
    log.info("Successfully closed Endpoint Listener for port "+port);
for (ListenerEndpoint listenerEndpoint : endpoints) {
  log.info("Closing Endpoint Listener for port "+port);
  listenerEndpoint.close();
  log.info("Successfully closed Endpoint Listener for port "+port);
origin: OPCFoundation/UA-Java-Legacy

for ( SocketHandle sh : socketHandleSnapshot() ) {
  ListenerEndpoint le = sh.listenerEndpoint;
  if ( le != null ) le.close();
  sh.listenerEndpoint = null;
origin: com.bugvm/bugvm-rt

@Override
public Set<ListenerEndpoint> getEndpoints() {
  final Set<ListenerEndpoint> set = new HashSet<ListenerEndpoint>();
  synchronized (this.endpoints) {
    final Iterator<ListenerEndpointImpl> it = this.endpoints.iterator();
    while (it.hasNext()) {
      final ListenerEndpoint endpoint = it.next();
      if (!endpoint.isClosed()) {
        set.add(endpoint);
      } else {
        it.remove();
      }
    }
  }
  return set;
}
origin: wso2/wso2-synapse

ListenerEndpoint endpoint = endpoints.remove();
try {
  endpoint.waitFor();
  if (log.isInfoEnabled()) {
    InetSocketAddress address = (InetSocketAddress) endpoint.getAddress();
    if (!address.isUnresolved()) {
      log.info(name + " started on " + address.getHostName() + ":" + address.getPort());
origin: wso2/wso2-synapse

if (inetSocketAddress.getHostName().equalsIgnoreCase(((InetSocketAddress) listenerEndpoint.getAddress()).getHostName())) {
  listenerEndpoint.close();
  endPointsClosed.add((InetSocketAddress) listenerEndpoint.getAddress());
origin: wso2/wso2-synapse

public void reload(final TransportInDescription transportIn) throws AxisFault {
  if (state != BaseConstants.STARTED) return;
  
  // Close all listener endpoints and stop accepting new connections
  Set<ListenerEndpoint> endpoints = ioReactor.getEndpoints();
  for (ListenerEndpoint endpoint: endpoints) {
    endpoint.close();
  }
  
  // Rebuild connection factory
  HttpHost host = new HttpHost(
    listenerContext.getHostname(), 
    listenerContext.getPort(), 
    scheme.getName());
  ServerConnFactoryBuilder connFactoryBuilder = initConnFactoryBuilder(transportIn, host);
  connFactory = connFactoryBuilder.build(params);
  iodispatch.update(connFactory);
  
  startEndpoints();
  
  log.info(name + " Reloaded");
}
origin: org.apache.commons/commons-vfs2

debug("Serving " + docRoot + " on " + server.getEndpoint().getAddress()
    + (sslContext == null ? "" : " with " + sslContext.getProvider() + " " + sslContext.getProtocol()));
server.getEndpoint().waitFor();
origin: apache/commons-vfs

debug("Serving " + docRoot + " on " + server.getEndpoint().getAddress()
    + (sslContext == null ? "" : " with " + sslContext.getProvider() + " " + sslContext.getProtocol()));
server.getEndpoint().waitFor();
org.apache.http.nio.reactorListenerEndpoint

Javadoc

ListenerEndpoint interface represents an endpoint used by an I/O reactor to listen for incoming connection from remote clients.

Most used methods

  • close
    Closes this endpoint. The endpoint will stop accepting incoming connection.
  • getAddress
    Returns the socket address of this endpoint.
  • isClosed
    Determines if this endpoint has been closed and is no longer listens for incoming connections.
  • waitFor
    Waits for completion of initialization process of this endpoint.

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • getResourceAsStream (ClassLoader)
  • requestLocationUpdates (LocationManager)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now