org.objectweb.mobilitools.smi
Class Misc
java.lang.Object
|
+--org.objectweb.mobilitools.smi.Misc
- public abstract class Misc
- extends java.lang.Object
Constructor Summary |
Misc()
|
Method Summary |
static java.util.Properties |
any2property(org.omg.CORBA.Any[] any)
|
static java.net.URL[] |
codebase2URLs(java.lang.String codebase)
|
static java.lang.ClassLoader |
getClassLoader(java.lang.ClassLoader parent,
java.lang.String codebase,
org.omg.CfMAF.AgentProfile profile,
org.omg.CfMAF.MAFAgentSystem provider)
Invokes the ClassLoader factory (as set by the appropriate system
property) to get a classloader for the given parameters. |
static boolean |
matchProfile(java.lang.Object mask,
java.lang.Object value)
|
static boolean |
matchProperties(java.util.Properties subset,
java.util.Properties set)
|
static org.omg.CfMAF.AgentProfile |
newDummyAgentProfile()
|
static org.omg.CfMAF.AgentSystemInfo |
newDummyAgentSystemInfo()
|
static org.omg.CfMAF.Name |
newDummyName()
|
static org.omg.CORBA.Any[] |
property2any(java.util.Properties properties,
org.omg.CORBA.ORB orb)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DUMMYNAME
public static final org.omg.CfMAF.Name DUMMYNAME
DUMMYAGENTPROFILE
public static final org.omg.CfMAF.AgentProfile DUMMYAGENTPROFILE
DUMMYAGENTSYSTEMINFO
public static final org.omg.CfMAF.AgentSystemInfo DUMMYAGENTSYSTEMINFO
Misc
public Misc()
newDummyName
public static org.omg.CfMAF.Name newDummyName()
newDummyAgentProfile
public static org.omg.CfMAF.AgentProfile newDummyAgentProfile()
newDummyAgentSystemInfo
public static org.omg.CfMAF.AgentSystemInfo newDummyAgentSystemInfo()
any2property
public static java.util.Properties any2property(org.omg.CORBA.Any[] any)
property2any
public static org.omg.CORBA.Any[] property2any(java.util.Properties properties,
org.omg.CORBA.ORB orb)
matchProfile
public static boolean matchProfile(java.lang.Object mask,
java.lang.Object value)
- Parameters:
mask
- a AgentSystemInfo or AgentProfile instance, which may contain
zero values (i.e. zero for integer fields, empty string for string fields).
A null mask matches any profile, provided that the Profile type is the same
(i.e. AgentProfile for both the mask and the value, or AgentSystemInfo for both).value
- an actual, complete AgentSystemInfo or AgentProfile instance,
that has to be matched against the mask parameter. A null value matches with no mask
but the null mask.- Returns:
- true if profile (i.e. AgentProfile or AgentSystemInfo) value
matches mask profile, false otherwise.
matchProperties
public static boolean matchProperties(java.util.Properties subset,
java.util.Properties set)
getClassLoader
public static java.lang.ClassLoader getClassLoader(java.lang.ClassLoader parent,
java.lang.String codebase,
org.omg.CfMAF.AgentProfile profile,
org.omg.CfMAF.MAFAgentSystem provider)
- Invokes the ClassLoader factory (as set by the appropriate system
property) to get a classloader for the given parameters. Note that
parameters may have various interpretations, or may be ignored, depending
on the actual class loader.
- Parameters:
parent
- the returned classloader's parentcodebase
- the codebase (form depends on the actual classloader)profile
- the agent profile (see MAF spec.)provider
- the MAFAgentSystem implementation providing where to get
classes from- Returns:
- the appropriate classloader instance
- See Also:
SMIClassLoader
,
RMIClassLoaderAdapter
,
URLClassLoaderAdapter
,
Constants
codebase2URLs
public static java.net.URL[] codebase2URLs(java.lang.String codebase)
throws java.net.MalformedURLException