org.jtoolkit.essence.data
Class CacheComponentBuilder

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

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


Nested Class Summary
static class CacheComponentBuilder.CacheData
           
 
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
CacheComponentBuilder(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

CacheComponentBuilder

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

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

getName

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

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()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Throws:
java.io.IOException


Copyright © Peter Lawrey. All Rights Reserved.