You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2002/07/30 15:52:04 UTC
cvs commit: jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model Resource.java
mcconnell 2002/07/30 06:52:04
Added: assembly/src/java/org/apache/excalibur/merlin/model
Resource.java
Log:
replaces ResourceDesignator
Revision Changes Path
1.1 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/model/Resource.java
Index: Resource.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.excalibur.merlin.model;
import org.apache.excalibur.meta.info.ServiceDescriptor;
/**
* Interface implemented by object capable of supply a resources.
*
* @author <a href="mailto:mcconnell@apache.org">Stephen McConnell</a>
* @version $Revision: 1.1 $ $Date: 2002/07/30 13:52:04 $
*/
public interface Resource
{
static final int NOT_STARTED = 0;
static final int STARTED = 1;
static final int STOPPED = 2;
/**
* Returns the designated resource path.
*
* @return the resource path
*/
String getPath();
/**
* Returns the resource descriptor.
*
* @return the descriptor
*/
ServiceDescriptor[] getServices();
/**
* Return the profile.
*
* @return the profile
*/
Profile getProfile();
/**
* Returns the active state of the resoruce.
* @return one of the values NOT_STARTED, STARTED, or STOPPED
*/
int getState();
/**
* Return the resource instance.
*
* @return an instance of the type constrained to the profile
*/
Object create() throws Exception;
/**
* Return the resource instance.
*
* @return an instance of the type defined by the profile
*/
Object access() throws Exception;
/**
* Release the service instance.
*/
public void release( Object instance ) throws Exception;
/**
* Destroy the resource.
*/
void destroy() throws Exception;
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>