protected Object createResource() throws ResourceUnavailableException {
  Object resource=create();
  freed.add(resource);
  numCreated++;
  return (resource);
}

protected Object createResource ( ) throws ResourceUnavailableException { Object resource = create ( ) ; freed . add ( resource ) ; numCreated ++ ; return ( resource ) ; }
creates a new resource and performs any initilization required to manage the resource
