Tabnine Logo
ReconfigurableClient.closeConnection
Code IndexAdd Tabnine to your IDE (free)

How to use
closeConnection
method
in
net.roboconf.messaging.api.reconfigurables.ReconfigurableClient

Best Java code snippets using net.roboconf.messaging.api.reconfigurables.ReconfigurableClient.closeConnection (Showing top 2 results out of 315)

origin: net.roboconf/roboconf-messaging-rabbitmq

private void resetClients( boolean shutdown ) {
  // Make fresh snapshots of the clients, as we don't want to reconfigure them while holding the lock.
  final ArrayList<RabbitMqClient> clients;
  synchronized( this ) {
    // Get the snapshot.
    clients = new ArrayList<>( this.clients );
    // Remove the clients, new ones will be created if necessary.
    this.clients.clear();
  }
  // Now reconfigure all the clients.
  for( RabbitMqClient client : clients ) {
    try {
      final ReconfigurableClient<?> reconfigurable = client.getReconfigurableClient();
      // The reconfigurable can never be null.
      // If it was, a NPE would have been thrown when the Rabbit MQ client was created.
      if( shutdown )
        reconfigurable.closeConnection();
      else
        reconfigurable.switchMessagingType( RabbitMqConstants.FACTORY_RABBITMQ );
    } catch( Throwable t ) {
      // Warn but continue to reconfigure the next clients!
      this.logger.warning("A client has thrown an exception on reconfiguration: " + client);
      Utils.logException(this.logger, new RuntimeException(t));
    }
  }
}
origin: roboconf/roboconf-platform

@After
public void releaseClients() throws Exception {
  for( ReconfigurableClient<?> client : this.clients ) {
    client.getMessageProcessor().stopProcessor();
    client.getMessageProcessor().interrupt();
    client.closeConnection();
  }
  this.clients.clear();
}
net.roboconf.messaging.api.reconfigurablesReconfigurableClientcloseConnection

Popular methods of ReconfigurableClient

  • getOwnerKind
  • lookupMessagingClientFactoryRegistryService
    Try to locate the MessagingClientFactoryRegistry service in an OSGi execution context. NOTE: this me
  • switchMessagingType
    Changes the internal messaging client.
  • terminateClient
    Closes the connection of a messaging client and terminates it properly.
  • configureMessageProcessor
    Configures the message processor.
  • createMessagingClient
    Creates a new messaging client.
  • getMessageProcessor
  • getRegistry
  • openConnection
    Configures a newly created client. For an agent, it consists into listening to messages coming from
  • resetInternalClient
    Resets the internal client.
  • setRegistry
    Sets the MessagingClientFactoryRegistry associated for this client.
  • setRegistry

Popular in Java

  • Start an intent from android
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • startActivity (Activity)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • BoxLayout (javax.swing)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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