adammurdoch 2002/06/15 00:55:35
Added: container/src/java/org/apache/myrmidon/interfaces/service
ServiceDescriptor.java
Log:
Add ServiceDescriptor, which provides meta-info about a service (for now).
Revision Changes Path
1.1
jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/service/ServiceDescriptor.java
Index: ServiceDescriptor.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.myrmidon.interfaces.service;
/**
* Meta-info about a service.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Adam Murdoch</a>
* @version $Revision: 1.1 $ $Date: 2002/06/15 07:55:35 $
*
* @todo Use the avalon stuff instead?
*/
public class ServiceDescriptor
{
private final String[] m_roles;
private final ServiceFactory m_factory;
public ServiceDescriptor( final String role,
final ServiceFactory factory )
{
m_roles = new String[] { role };
m_factory = factory;
}
public ServiceDescriptor( final String[] roles,
final ServiceFactory factory )
{
m_roles = roles;
m_factory = factory;
}
/**
* Returns the roles that the service provides.
*/
public String[] getRoles()
{
return m_roles;
}
/**
* Returns the factory to use to create instances of the service.
*/
public ServiceFactory getFactory()
{
return m_factory;
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>