Package com.yahoo.messagebus.routing
Class ApplicationSpec
- java.lang.Object
-
- com.yahoo.messagebus.routing.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 aRoutingSpec
holds valid routing specifications.- Author:
- Simon Thoresen Hult
-
-
Constructor Summary
Constructors Constructor Description ApplicationSpec()
Constructs a new instance of this class.ApplicationSpec(ApplicationSpec obj)
Implements the copy constructor.
-
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.
-
-
-
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.
-
-