org.jboss.classloading.spi.dependency
Class Domain

java.lang.Object
  extended by org.jboss.classloading.spi.dependency.Domain

public class Domain
extends Object

Domain.

Version:
$Revision: 1.1 $
Author:
Adrian Brock, Ales Justin

Constructor Summary
Domain(ClassLoading classLoading, String name, String parentDomainName, boolean parentFirst)
          Create a new Domain.
 
Method Summary
 void addModule(Module module)
          Add a module
 Module getModule(String name)
          Get a module for a context name
 String getName()
          Get the name.
 Domain getParentDomain()
           
 String getParentDomainName()
          Get the parentDomainName.
 boolean isParentFirst()
          Get the parentFirst.
protected  void removeModule(Module module)
          Remove a deployment
protected  Module resolveModule(Module module, Requirement requirement)
          Resolve a requirement to a module
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Domain

public Domain(ClassLoading classLoading,
              String name,
              String parentDomainName,
              boolean parentFirst)
Create a new Domain.

Parameters:
classLoading - the classloading
name - the name
parentDomainName - the parent domain name
parentFirst - whether to check the parent first
Throws:
IllegalArgumentException - for a null domain or classloading
Method Detail

getName

public String getName()
Get the name.

Returns:
the name.

getParentDomainName

public String getParentDomainName()
Get the parentDomainName.

Returns:
the parentDomainName.

getParentDomain

public Domain getParentDomain()

isParentFirst

public boolean isParentFirst()
Get the parentFirst.

Returns:
the parentFirst.

addModule

public void addModule(Module module)
Add a module

Parameters:
module - the module
Throws:
IllegalStateException - if the module is already registered
IllegalArgumentException - for a null parameter

removeModule

protected void removeModule(Module module)
Remove a deployment

Parameters:
module - the module
Throws:
IllegalArgumentException - for a null parameter

getModule

public Module getModule(String name)
Get a module for a context name

Parameters:
name - the context name
Returns:
the module

resolveModule

protected Module resolveModule(Module module,
                               Requirement requirement)
Resolve a requirement to a module

Parameters:
module - the module
requirement - the requirement
Returns:
the resolved name or null if not resolved

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.