org.guiceyfruit.support
Class CompositeCloser

java.lang.Object
  extended by org.guiceyfruit.support.CompositeCloser
All Implemented Interfaces:
Closer

public class CompositeCloser
extends java.lang.Object
implements Closer

A Composite implementation of Closer

Version:
$Revision: 1.1 $
Author:
james.strachan@gmail.com (James Strachan)

Constructor Summary
CompositeCloser(java.lang.Iterable<Closer> closers)
           
 
Method Summary
 void close(java.lang.Object object)
          Closes the given object
static Closer newInstance(java.util.Collection<Closer> closers)
          Returns a Closer for the given lists of closer strategies or returning null if the collection is empty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeCloser

public CompositeCloser(java.lang.Iterable<Closer> closers)
Method Detail

newInstance

public static Closer newInstance(java.util.Collection<Closer> closers)
Returns a Closer for the given lists of closer strategies or returning null if the collection is empty


close

public void close(java.lang.Object object)
           throws java.lang.Throwable
Description copied from interface: Closer
Closes the given object

Specified by:
close in interface Closer
Parameters:
object - the object to be closed
Throws:
java.lang.Exception - if the close operation caused some exception to occur
java.lang.Throwable


Copyright © 2009. All Rights Reserved.