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

  • Reading from database using SQL prepared statement
  • getSystemService (Context)
  • getApplicationContext (Context)
  • compareTo (BigDecimal)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Path (java.nio.file)
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • 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