public class Failover<T>
extends java.lang.Object
com.thoughtworks.proxy.toys.failover| Modifier and Type | Class and Description |
|---|---|
static class |
Failover.FailoverBuild<T> |
static class |
Failover.FailoverExceptingOrBuild<T> |
static class |
Failover.FailoverWithOrExceptingOrBuild<T> |
| Modifier and Type | Field and Description |
|---|---|
private T[] |
delegates |
private java.lang.Class<? extends java.lang.Throwable> |
exceptionClass |
private java.lang.Class<?>[] |
types |
| Modifier | Constructor and Description |
|---|---|
private |
Failover(java.lang.Class<T> primaryType,
java.lang.Class<?>... types) |
| Modifier and Type | Method and Description |
|---|---|
static <T> Failover.FailoverWithOrExceptingOrBuild<T> |
proxy(java.lang.Class<T> type)
Creates a factory for proxy instances handling failover situations.
|
static <T> Failover.FailoverWithOrExceptingOrBuild<T> |
proxy(java.lang.Class<T> primaryType,
java.lang.Class<?>... types)
Creates a factory for proxy instances handling failover situations.
|
static <T> Failover.FailoverExceptingOrBuild<T> |
proxy(T... delegates)
Creates a factory for proxy instances handling failover situations.
|
private java.lang.Class<?>[] types
private T[] delegates
private java.lang.Class<? extends java.lang.Throwable> exceptionClass
private Failover(java.lang.Class<T> primaryType, java.lang.Class<?>... types)
public static <T> Failover.FailoverWithOrExceptingOrBuild<T> proxy(java.lang.Class<T> type)
type - the types of the proxypublic static <T> Failover.FailoverWithOrExceptingOrBuild<T> proxy(java.lang.Class<T> primaryType, java.lang.Class<?>... types)
primaryType - the primary type implemented by the proxytypes - other types that are implemented by the proxypublic static <T> Failover.FailoverExceptingOrBuild<T> proxy(T... delegates)
delegates - the array with the delegates in a failover situation