Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2008, 2010 VMware Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: VMware Inc. - initial contribution /
 
 
 package org.eclipse.virgo.kernel.model.management;
 
 
 import  org.eclipse.equinox.region.Region;
An strategy interface for creating object names based on an input org.eclipse.virgo.kernel.model.Artifact

Concurrent Semantics
Implementations must be threadsafe

 
 public interface RuntimeArtifactModelObjectNameCreator {

    
 
     ObjectName createArtifactModel(Artifact artifact);

    
Creates an ArtifactModel javax.management.ObjectName based on an input type, name, version, and region.

Parameters:
type The type of the object to create an @{link ObjectName} for
name The name of the object to create an @{link ObjectName} for
version The version of the object to create an @{link ObjectName} for
region The Region of the object to create an @{link ObjectName} for
Returns:
An javax.management.ObjectName for the runtime artifact represented by this type, name, version, and region
 
     ObjectName createArtifactModel(String typeString nameVersion version, Region region);

    
Creates a query javax.management.ObjectName that can be used to enumerate all of the artifacts in the runtime artifact models for both user and kernel regions

Returns:
An javax.management.ObjectName that can be used for querying
 
Creates a query javax.management.ObjectName that can be used to enumerate all of the artifacts of a given type in the runtime artifact model

Parameters:
type The type of artifacts to query for
Returns:
An javax.management.ObjectName that can be used for querying
 
Creates a query javax.management.ObjectName that can be used to enumerate all of the versions of a given artifact type and name in the runtime artifact model

Parameters:
type The type of artifacts to query for
name The name of artifacts to query for
Returns:
An javax.management.ObjectName that can be used for querying
 
     ObjectName createArtifactVersionsQuery(String typeString name);

    
Gets the type of an artifact identified by an ObjectName

Parameters:
objectName The identifying ObjectName
Returns:
The type of the artifact
 
     //String getType(ObjectName objectName);
 
    
Gets the name of an artifact identified by an javax.management.ObjectName

Parameters:
objectName The identifying javax.management.ObjectName
Returns:
The name of the artifact
 
     String getName(ObjectName objectName);

    
Gets the version of an artifact identified by an javax.management.ObjectName

Parameters:
objectName The identifying javax.management.ObjectName
Returns:
The version of the artifact
    String getVersion(ObjectName objectName);

    
Gets the version of an artifact identified by an javax.management.ObjectName

Parameters:
objectName The identifying javax.management.ObjectName
Returns:
The version of the artifact
    String getRegion(ObjectName objectName);
New to GrepCode? Check out our FAQ X