*/
public class MRClientBuilders
{
+ private final static String ILLEGAL_ARGUMENT_MESSAGE = "You must provide at least one host and a topic name.";
/**
* Instantiates MRClientBuilders.
*/
public static class ConsumerBuilder
{
- /**
- * Construct a consumer builder.
- */
- public ConsumerBuilder () {}
/**
* Set the host list
{
if ( fHosts == null || fHosts.isEmpty() || fTopic == null )
{
- throw new IllegalArgumentException ( "You must provide at least one host and a topic name." );
+ throw new IllegalArgumentException ( ILLEGAL_ARGUMENT_MESSAGE );
}
if ( fGroup == null )
*/
public static class PublisherBuilder
{
- public PublisherBuilder () {}
/**
* Set the MR/UEB host(s) to use
{
if ( fHosts == null || fHosts.isEmpty() || fTopic == null )
{
- throw new IllegalArgumentException ( "You must provide at least one host and a topic name." );
+ throw new IllegalArgumentException ( ILLEGAL_ARGUMENT_MESSAGE );
}
if ( sfPublisherMock != null ) return sfPublisherMock;
*/
public static class IdentityManagerBuilder extends AbstractAuthenticatedManagerBuilder<MRIdentityManager>
{
- /**
- * Construct an identity manager builder.
- */
- public IdentityManagerBuilder () {}
@Override
protected MRIdentityManager constructClient ( Collection<String> hosts ) { try {
*/
public static class TopicManagerBuilder extends AbstractAuthenticatedManagerBuilder<MRTopicManager>
{
- /**
- * Construct an topic manager builder.
- */
- public TopicManagerBuilder () {}
@Override
protected MRTopicManager constructClient ( Collection<String> hosts ) { try {
{
if ( fHosts.isEmpty() )
{
- throw new IllegalArgumentException ( "You must provide at least one host and a topic name." );
+ throw new IllegalArgumentException ( ILLEGAL_ARGUMENT_MESSAGE );
}
final T mgr = constructClient ( fHosts );