org.apache.mina.util
Class LazyInitializer<V>

java.lang.Object
  extended by org.apache.mina.util.LazyInitializer<V>
Direct Known Subclasses:
IoBufferLazyInitializer, LazyInitializedCacheMap.NoopInitializer

public abstract class LazyInitializer<V>
extends Object

An abstract class which provides semantics for an object which will be only fully initialized when requested to. It allows to avoid loosing time when early initializing unnecessary objects.

Since:
MINA 2.0.0-M2
Version:
$Rev$, $Date$
Author:
The Apache MINA Project (dev@mina.apache.org)

Constructor Summary
LazyInitializer()
           
 
Method Summary
 V get()
          Returns the value resulting from the initialization.
abstract  V init()
          Initializes the value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazyInitializer

public LazyInitializer()
Method Detail

init

public abstract V init()
Initializes the value.

Returns:
the initialized value

get

public V get()
Returns the value resulting from the initialization.

Returns:
the initialized value


Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.