public class ProtocolRepository extends Object
Constructor and Description |
---|
ProtocolRepository() |
Modifier and Type | Method and Description |
---|---|
void |
clearPolicyCache()
Clears the internal cache of routing policies.
|
Protocol |
getProtocol(String name)
Returns the protocol whose name matches the given argument.
|
com.yahoo.messagebus.routing.RoutingPolicy |
getRoutingPolicy(String protocolName,
String policyName,
String policyParam)
Creates and returns a routing policy that matches the given arguments.
|
com.yahoo.messagebus.routing.RoutingPolicy |
getRoutingPolicy(com.yahoo.text.Utf8String protocolName,
String policyName,
String policyParam) |
boolean |
hasProtocol(String name)
Returns whether or not this repository contains a protocol with the given name.
|
void |
putProtocol(Protocol protocol)
Registers a protocol with this repository.
|
public void putProtocol(Protocol protocol)
protocol
- The protocol to register.public boolean hasProtocol(String name)
getProtocol(String)
and expect the return value to
be non-null. Instead just get the protocol and compare it to null.name
- The name to check for.public Protocol getProtocol(String name)
name
- The name of the protocol to return.public com.yahoo.messagebus.routing.RoutingPolicy getRoutingPolicy(String protocolName, String policyName, String policyParam)
putProtocol(Protocol)
the policy cache is cleared.protocolName
- The name of the protocol whose routing policy to create.policyName
- The name of the routing policy to create.policyParam
- The parameter to pass to the routing policy constructor.public final com.yahoo.messagebus.routing.RoutingPolicy getRoutingPolicy(com.yahoo.text.Utf8String protocolName, String policyName, String policyParam)
public void clearPolicyCache()
Copyright © 2018. All rights reserved.