Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package io.advantageous.qbit.admin;
  
  
  
 
 public class AdminBuilder {
 
 
     public static final String CONTEXT = "qbit.service.admin.";
 
     private int port= 7777;
     private String host;
     private String name;
     private Admin admin;
     private HealthServiceAsync healthService;
 
     public static AdminBuilder adminBuilder() {
         return new AdminBuilder();
     }
 
 
     public AdminBuilder(final PropertyResolver propertyResolver) {
          = propertyResolver.getIntegerProperty("port");
          = propertyResolver.getStringProperty("host");
     }
 
     public AdminBuilder() {
 
         this(PropertyResolver.createSystemPropertyResolver());
     }
 
     public AdminBuilder(Properties properties) {
 
         this(PropertyResolver.createPropertiesPropertyResolver(properties));
     }
 
     public HealthServiceAsync getHealthService() {
         if (==null) {
              = getHealthServiceBuilder().buildAndStart();
         }
         return ;
     }
 
     public AdminBuilder setHealthService(HealthServiceAsync healthService) {
         this. = healthService;
         return this;
     }
 
         if ( == null) {
              = HealthServiceBuilder.healthServiceBuilder();
         }
         return ;
     }
 
     public AdminBuilder setHealthServiceBuilder(HealthServiceBuilder healthServiceBuilder) {
         this. = healthServiceBuilder;
         return this;
     }
 
     public Admin getAdmin() {
         if ( == null) {
              = new Admin(getHealthService());
         }
         return ;
     }
 
     public void setAdmin(Admin admin) {
         this. = admin;
     }
 
     public String getName() {
         return ;
     }
 
     public AdminBuilder setName(String name) {
         this. = name;
         return this;
     }
 
 
         if (==null) {
              = getEndpointServerBuilder().build();
         }
         return ;
     }
 
     public void setServiceEndpointServer(ServiceEndpointServer serviceEndpointServer) {
         this. = serviceEndpointServer;
    }
    public int getPort() {
        return ;
    }
    public AdminBuilder setPort(int port) {
        this. = port;
        return this;
    }
    public String getHost() {
        return ;
    }
    public AdminBuilder setHost(String host) {
        this. = host;
        return this;
    }
        if ( == null) {
             =  EndpointServerBuilder.endpointServerBuilder().setPort(this.getPort());
            if (!=null && !"".equals()) {
                .setHost();
            }
        }
        return ;
    }
    public AdminBuilder setEndpointServerBuilder(EndpointServerBuilder endpointServerBuilder) {
        this. = endpointServerBuilder;
        return this;
    }
    public ServiceEndpointServer build() {
        ServiceEndpointServer serviceEndpointServer = getServiceEndpointServer();
        if (==null) {
            serviceEndpointServer.initServices(getAdmin());
        } else {
            serviceEndpointServer.addServiceObject(getAdmin());
        }
        return serviceEndpointServer;
    }
New to GrepCode? Check out our FAQ X