creamtec.core.util
Interface ResourceFactory


public interface ResourceFactory

ResourceFactory must be implemented by users of ResourcePool. The pool delegates the task of creating and freeing resources to the Factory, making the pool generic


Method Summary
 java.lang.Object createResource()
          Must create a new resource and return it
 void freeResource(java.lang.Object resource)
          Must free the resource since it will not be used anymore
 

Method Detail

createResource

java.lang.Object createResource()
                                throws java.lang.Exception
Must create a new resource and return it

Throws:
java.lang.Exception

freeResource

void freeResource(java.lang.Object resource)
                  throws java.lang.Exception
Must free the resource since it will not be used anymore

Throws:
java.lang.Exception


Copyright © 2000-2006 CreamTec LLC. All Rights Reserved.