public abstract class Sender
extends java.lang.Object
Constructor and Description |
---|
Sender() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getClassInstance(java.lang.String sClass)
Load and create a class instance, with this order of loading:
extra class loader (set by
setClassLoader(ClassLoader) )
class loader of the current thread
current thread context class loader
class loader of this object instance
JVM default class loader
If none of these succeeds then return null . |
java.lang.ClassLoader |
getClassLoader()
Get the extra class loader
|
abstract boolean |
init(ExtProperties prop,
java.lang.String keyPrefix)
This method is called by
Notifier after an instance of a class implementing this interface is created
with the default constructor. |
abstract boolean |
send(Message m)
Send the message to the target (mail / instant message / log file etc)
|
void |
setClassLoader(java.lang.ClassLoader loader)
Give an extra class loader, in case we need to load arbitrary classes
|
public abstract boolean init(ExtProperties prop, java.lang.String keyPrefix)
Notifier
after an instance of a class implementing this interface is created
with the default constructor. Each implementing class should take what is useful for it from the given
configuration, taking into account (only) the keys with the given prefix.prop
- configuration contentskeyPrefix
- prefix for the subset of options that are relevant to this instancepublic abstract boolean send(Message m)
m
- message to sendpublic final void setClassLoader(java.lang.ClassLoader loader)
loader
- public final java.lang.ClassLoader getClassLoader()
public final java.lang.Object getClassInstance(java.lang.String sClass)
setClassLoader(ClassLoader)
)null
.sClass
-