@ExclusiveOptionals(isOneRequired=true) public final class CustomValidatorFactory extends Object
type attribute, or a
MuleRegistry reference (through the ref one.
When the type attribute is used to reference a type, then a new instance is returned each time that
getObject() is invoked. That type is also expected to have a public default Constructor.
When a ref is provided, then that value is searched by using the Registry.get(String). Notice however that
the reference will be re fetched each time that getObject() is invoked
The type and ref attributes are mutually exclusive. A IllegalArgumentException is thrown if both are
set by the time getObject() is invoked. The same exception is also thrown if none of them are.
Instances of this class are to be considered thread-safe and reusable.
| Constructor and Description |
|---|
CustomValidatorFactory() |
CustomValidatorFactory(String type,
Validator ref) |
| Modifier and Type | Method and Description |
|---|---|
protected Validator |
doGetByClassName(org.mule.runtime.core.api.MuleContext muleContext) |
boolean |
equals(Object other) |
Validator |
getObject() |
Validator |
getRef() |
String |
getType() |
int |
hashCode() |
void |
setMuleContext(org.mule.runtime.core.api.MuleContext context) |
public final Validator getObject()
protected Validator doGetByClassName(org.mule.runtime.core.api.MuleContext muleContext)
public void setMuleContext(org.mule.runtime.core.api.MuleContext context)
public Validator getRef()
public String getType()
Copyright © 2017 MuleSoft, Inc.. All rights reserved.