Class ApplicationSpec


  • public class ApplicationSpec
    extends java.lang.Object
    This class holds the specifications of an application running message bus services. It is used for ensuring that a RoutingSpec holds valid routing specifications.
    Author:
    Simon Thoresen Hult
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ApplicationSpec add​(ApplicationSpec app)
      Adds the content of the given application to this.
      ApplicationSpec addService​(java.lang.String protocol, java.lang.String name)
      Adds a service name to the list of known services.
      boolean isService​(java.lang.String protocol, java.lang.String pattern)
      Determines whether or not the given service pattern matches any of the known services.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ApplicationSpec

        public ApplicationSpec()
        Constructs a new instance of this class.
      • ApplicationSpec

        public ApplicationSpec​(ApplicationSpec obj)
        Implements the copy constructor.
        Parameters:
        obj - The object to copy.
    • Method Detail

      • add

        public ApplicationSpec add​(ApplicationSpec app)
        Adds the content of the given application to this.
        Parameters:
        app - The application whose content to copy.
        Returns:
        This, to allow chaining.
      • addService

        public ApplicationSpec addService​(java.lang.String protocol,
                                          java.lang.String name)
        Adds a service name to the list of known services.
        Parameters:
        protocol - The protocol for which to add the service.
        name - The service to add.
        Returns:
        This, to allow chaining.
      • isService

        public boolean isService​(java.lang.String protocol,
                                 java.lang.String pattern)
        Determines whether or not the given service pattern matches any of the known services.
        Parameters:
        protocol - The protocol whose services to check.
        pattern - The pattern to match.
        Returns:
        True if at least one service was found.