org.apache.tuscany.sca.extensibility
Interface ServiceDeclaration

All Known Implementing Classes:
ContextClassLoaderServiceDiscoverer.ServiceDeclarationImpl, EquinoxServiceDiscoverer.ServiceDeclarationImpl, OSGiServiceDiscoverer.ServiceDeclarationImpl

public interface ServiceDeclaration

Service declaration using J2SE Jar service provider spec Classes specified inside this declaration are loaded using the ClassLoader used to read the configuration file corresponding to this declaration.


Method Summary
 boolean equals(java.lang.Object obj)
          The service descriptor might be hashed
 java.util.Map<java.lang.String,java.lang.String> getAttributes()
          Get all attributes (name=value pairs) defined for the given entry
 java.lang.String getClassName()
           
 java.net.URL getLocation()
           
 java.net.URL getResource(java.lang.String name)
           
 int hashCode()
          The service descriptor might be hashed
 java.lang.Class<?> loadClass()
          Get the java class for the service impl
 java.lang.Class<?> loadClass(java.lang.String className)
          Load a java class in the same context as the service definition
 

Method Detail

loadClass

java.lang.Class<?> loadClass(java.lang.String className)
                             throws java.lang.ClassNotFoundException
Load a java class in the same context as the service definition

Parameters:
className - The class name
Returns:
The loaded class
Throws:
java.lang.ClassNotFoundException

loadClass

java.lang.Class<?> loadClass()
                             throws java.lang.ClassNotFoundException
Get the java class for the service impl

Returns:
The java class
Throws:
java.lang.ClassNotFoundException

getAttributes

java.util.Map<java.lang.String,java.lang.String> getAttributes()
Get all attributes (name=value pairs) defined for the given entry

Returns:
All attributes keyed by name

getLocation

java.net.URL getLocation()

getClassName

java.lang.String getClassName()

getResource

java.net.URL getResource(java.lang.String name)

equals

boolean equals(java.lang.Object obj)
The service descriptor might be hashed

Overrides:
equals in class java.lang.Object
Parameters:
obj - Another object
Returns:

hashCode

int hashCode()
The service descriptor might be hashed

Overrides:
hashCode in class java.lang.Object
Returns: