org.jtoolkit.essence.data
Class ClusterComponentBuilder

java.lang.Object
  extended by org.jtoolkit.essence.data.ClusterComponentBuilder
All Implemented Interfaces:
java.io.Closeable, ComponentBuilder, Runs, Named

public class ClusterComponentBuilder
extends java.lang.Object
implements ComponentBuilder, Runs, java.io.Closeable

Author:
Peter Lawrey

Nested Class Summary
static class ClusterComponentBuilder.ClusterCollectionData
           
static class ClusterComponentBuilder.ClusterData
           
static class ClusterComponentBuilder.RoleType
           
 
Nested classes/interfaces inherited from interface org.jtoolkit.essence.utils.Named
Named.ContextSource<T>, Named.MapSource<T>, Named.Source<T>
 
Field Summary
 
Fields inherited from interface org.jtoolkit.essence.app.ComponentBuilder
ATTEMPTED_TO_GET_COMPONENT
 
Fields inherited from interface org.jtoolkit.essence.app.Runs
START
 
Constructor Summary
ClusterComponentBuilder(java.lang.String name, Container container)
           
 
Method Summary
 void close()
           
 java.lang.String getName()
           
<T> T
resolveComponent(java.lang.String componentName, java.lang.Class<T> type)
           
 void start()
          Start the component.
 void stop()
          Silently stop the component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterComponentBuilder

public ClusterComponentBuilder(@NotNull
                               java.lang.String name,
                               @NotNull
                               Container container)
                        throws java.lang.InstantiationException
Throws:
java.lang.InstantiationException
Method Detail

getName

@NotNull
public java.lang.String getName()
Specified by:
getName in interface Named
Returns:
A printable name.

resolveComponent

@Nullable
public <T> T resolveComponent(@NotNull
                                       java.lang.String componentName,
                                       @Nullable
                                       java.lang.Class<T> type)
                   throws java.lang.IllegalStateException,
                          java.lang.IllegalArgumentException
Specified by:
resolveComponent in interface ComponentBuilder
Throws:
java.lang.IllegalStateException
java.lang.IllegalArgumentException

start

public void start()
           throws java.lang.IllegalStateException,
                  java.lang.IllegalArgumentException
Description copied from interface: Runs
Start the component.

Specified by:
start in interface Runs
Throws:
java.lang.IllegalStateException - if the component could not be start due to a configuration error.
java.lang.IllegalArgumentException - if the component is configured with an invalid value.

stop

public void stop()
Description copied from interface: Runs
Silently stop the component.

Specified by:
stop in interface Runs

close

public void close()
Specified by:
close in interface java.io.Closeable


Copyright © Peter Lawrey. All Rights Reserved.