net.corda.node.services.messaging

## Class ArtemisMessagingServer

- SingletonSerializeAsToken
- - ArtemisMessagingComponent
  - - net.corda.node.services.messaging.ArtemisMessagingServer

- All Implemented Interfaces:
    SerializeAsToken

      public class ArtemisMessagingServer
      extends ArtemisMessagingComponent

  This class configures and manages an Apache Artemis message queue broker.

  Nodes communication is managed using an Artemis specific protocol, but it supports other protocols like AMQP/1.0 as well for interop.

  The current implementation is skeletal and lacks features like security or firewall tunnelling (that is, you must be able to receive TCP connections in order to receive messages). It is good enough for local communication within a fully connected network, trusted network or on localhost.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ArtemisMessagingServer.Companion`

    - ### Nested classes/interfaces inherited from class net.corda.node.services.messaging.ArtemisMessagingComponent

      `ArtemisMessagingComponent.ConnectionDirection, ArtemisMessagingComponent.NetworkMapAddress, ArtemisMessagingComponent.NodeAddress, ArtemisMessagingComponent.ServiceAddress`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ArtemisMessagingServer.Companion` | `Companion`

    - ### Fields inherited from class net.corda.node.services.messaging.ArtemisMessagingComponent

      `CLIENTS_PREFIX, INTERNAL_PREFIX, NETWORK_MAP_QUEUE, NODE_USER, NOTIFICATIONS_ADDRESS, P2P_QUEUE, PEERS_PREFIX, PEER_USER, RPC_QUEUE_REMOVALS_QUEUE, RPC_REQUESTS_QUEUE, SERVICES_PREFIX, VERIFY_PEER_COMMON_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ArtemisMessagingServer(NodeConfiguration config, com.google.common.net.HostAndPort artemisHostPort, com.google.common.net.HostAndPort rpcHostPort, NetworkMapCache networkMapCache, RPCUserService userService)` This class configures and manages an Apache Artemis message queue broker.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.google.common.net.HostAndPort` | `getArtemisHostPort()`
    `NodeConfiguration` | `getConfig()` The config object is used to pass in the passwords for the certificate KeyStore and TrustStore
    `NetworkMapCache` | `getNetworkMapCache()`
    `com.google.common.util.concurrent.SettableFuture<kotlin.Unit>` | `getNetworkMapConnectionFuture()` A ListenableFuture which completes when the server successfully connects to the network map node. If a non-recoverable error is encountered then the Future will complete with an exception.
    `com.google.common.net.HostAndPort` | `getRpcHostPort()`
    `RPCUserService` | `getUserService()`
    `void` | `start()` The server will make sure the bridge exists on network map changes, see method updateBridgesOnNetworkChange We assume network map will be updated accordingly when the client node register with the network map server.
    `void` | `stop()`

    - ### Methods inherited from class net.corda.node.services.messaging.ArtemisMessagingComponent

      `checkStorePasswords, expectedOnDefaultFileSystem, getConfig, tcpTransport, toHostAndPort`

    - ### Methods inherited from class net.corda.core.serialization.SingletonSerializeAsToken

      `toToken`

    - ### Methods inherited from interface net.corda.core.serialization.SerializeAsToken

      `toToken`

- - ### Field Detail

    - #### Companion

          public static ArtemisMessagingServer.Companion Companion

  - ### Constructor Detail

    - #### ArtemisMessagingServer

          public ArtemisMessagingServer(NodeConfiguration config,
                                        com.google.common.net.HostAndPort artemisHostPort,
                                        com.google.common.net.HostAndPort rpcHostPort,
                                        NetworkMapCache networkMapCache,
                                        RPCUserService userService)

      This class configures and manages an Apache Artemis message queue broker.

      Nodes communication is managed using an Artemis specific protocol, but it supports other protocols like AMQP/1.0 as well for interop.

      The current implementation is skeletal and lacks features like security or firewall tunnelling (that is, you must be able to receive TCP connections in order to receive messages). It is good enough for local communication within a fully connected network, trusted network or on localhost.

      Parameters:
        `config` - The config object is used to pass in the passwords for the certificate KeyStore and TrustStore

  - ### Method Detail

    - #### getNetworkMapConnectionFuture

          public com.google.common.util.concurrent.SettableFuture<kotlin.Unit> getNetworkMapConnectionFuture()

      A ListenableFuture which completes when the server successfully connects to the network map node. If a non-recoverable error is encountered then the Future will complete with an exception.

    - #### start

          public void start()

      The server will make sure the bridge exists on network map changes, see method updateBridgesOnNetworkChange We assume network map will be updated accordingly when the client node register with the network map server.

    - #### stop

          public void stop()

    - #### getConfig

          public NodeConfiguration getConfig()

      The config object is used to pass in the passwords for the certificate KeyStore and TrustStore

    - #### getArtemisHostPort

          public com.google.common.net.HostAndPort getArtemisHostPort()

    - #### getRpcHostPort

          public com.google.common.net.HostAndPort getRpcHostPort()

    - #### getNetworkMapCache

          public NetworkMapCache getNetworkMapCache()

    - #### getUserService

          public RPCUserService getUserService()