net.corda.node.services.messaging

## Class ArtemisMessagingComponent

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

- All Implemented Interfaces:
    SerializeAsToken
  Direct Known Subclasses:
    ArtemisMessagingServer, CordaRPCClient, NodeMessagingClient

      public class ArtemisMessagingComponent
      extends SingletonSerializeAsToken

  The base class for Artemis services that defines shared data structures and SSL transport configuration.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ArtemisMessagingComponent.Companion`
    `static class` | `ArtemisMessagingComponent.ConnectionDirection`
    `static class` | `ArtemisMessagingComponent.NetworkMapAddress`
    `static class` | `ArtemisMessagingComponent.NodeAddress` This is the class used to implement `interface SingleMessageRecipient`, for now. Note that in future this class may change or evolve and code that relies upon it being a simple host/port may not function correctly. For instance it may contain onion routing data.
    `static class` | `ArtemisMessagingComponent.ServiceAddress` `class ArtemisMessagingComponent.ServiceAddress` implements `interface MessageRecipientGroup`. It holds a queue associated with a service advertised by zero or more nodes. Each advertising node has an associated consumer.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `CLIENTS_PREFIX`
    `static ArtemisMessagingComponent.Companion` | `Companion`
    `static java.lang.String` | `INTERNAL_PREFIX`
    `static java.lang.String` | `NETWORK_MAP_QUEUE`
    `static java.lang.String` | `NODE_USER`
    `static java.lang.String` | `NOTIFICATIONS_ADDRESS`
    `static java.lang.String` | `P2P_QUEUE`
    `static java.lang.String` | `PEERS_PREFIX`
    `static java.lang.String` | `PEER_USER`
    `static java.lang.String` | `RPC_QUEUE_REMOVALS_QUEUE`
    `static java.lang.String` | `RPC_REQUESTS_QUEUE`
    `static java.lang.String` | `SERVICES_PREFIX`
    `static java.lang.String` | `VERIFY_PEER_COMMON_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ArtemisMessagingComponent()` The base class for Artemis services that defines shared data structures and SSL transport configuration.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkStorePasswords()` Returns nothing if the keystore was opened OK or throws if not. Useful to check the password, as unfortunately Artemis tends to bury the exception when the password is wrong.
    `void` | `expectedOnDefaultFileSystem(java.nio.file.Path $receiver)`
    `SSLConfiguration` | `getConfig()` The config object is used to pass in the passwords for the certificate KeyStore and TrustStore
    `org.apache.activemq.artemis.api.core.TransportConfiguration` | `tcpTransport(ArtemisMessagingComponent.ConnectionDirection direction, java.lang.String host, int port, boolean enableSSL)`
    `static com.google.common.net.HostAndPort` | `toHostAndPort(MessageRecipients target)` Assuming the passed in target address is actually an ArtemisAddress will extract the host and port of the node. This should only be used in unit tests and the internals of the messaging services to keep addressing opaque for the future. N.B. Marked as JvmStatic to allow use in the inherited classes.

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

      `toToken`

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

      `toToken`

- - ### Field Detail

    - #### NODE_USER

          public static java.lang.String NODE_USER

    - #### PEER_USER

          public static java.lang.String PEER_USER

    - #### INTERNAL_PREFIX

          public static java.lang.String INTERNAL_PREFIX

    - #### PEERS_PREFIX

          public static java.lang.String PEERS_PREFIX

    - #### SERVICES_PREFIX

          public static java.lang.String SERVICES_PREFIX

    - #### CLIENTS_PREFIX

          public static java.lang.String CLIENTS_PREFIX

    - #### P2P_QUEUE

          public static java.lang.String P2P_QUEUE

    - #### RPC_REQUESTS_QUEUE

          public static java.lang.String RPC_REQUESTS_QUEUE

    - #### RPC_QUEUE_REMOVALS_QUEUE

          public static java.lang.String RPC_QUEUE_REMOVALS_QUEUE

    - #### NOTIFICATIONS_ADDRESS

          public static java.lang.String NOTIFICATIONS_ADDRESS

    - #### NETWORK_MAP_QUEUE

          public static java.lang.String NETWORK_MAP_QUEUE

    - #### VERIFY_PEER_COMMON_NAME

          public static java.lang.String VERIFY_PEER_COMMON_NAME

    - #### Companion

          public static ArtemisMessagingComponent.Companion Companion

  - ### Constructor Detail

    - #### ArtemisMessagingComponent

          public ArtemisMessagingComponent()

      The base class for Artemis services that defines shared data structures and SSL transport configuration.

  - ### Method Detail

    - #### getConfig

          public SSLConfiguration getConfig()

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

    - #### checkStorePasswords

          public void checkStorePasswords()

      Returns nothing if the keystore was opened OK or throws if not. Useful to check the password, as unfortunately Artemis tends to bury the exception when the password is wrong.

    - #### tcpTransport

          public org.apache.activemq.artemis.api.core.TransportConfiguration tcpTransport(ArtemisMessagingComponent.ConnectionDirection direction,
                                                                                          java.lang.String host,
                                                                                          int port,
                                                                                          boolean enableSSL)

    - #### expectedOnDefaultFileSystem

          public void expectedOnDefaultFileSystem(java.nio.file.Path $receiver)

    - #### toHostAndPort

          public static com.google.common.net.HostAndPort toHostAndPort(MessageRecipients target)

      Assuming the passed in target address is actually an ArtemisAddress will extract the host and port of the node. This should only be used in unit tests and the internals of the messaging services to keep addressing opaque for the future. N.B. Marked as JvmStatic to allow use in the inherited classes.