public interface MediatorFactory<T1,T2,T3>
Modifier and Type | Method and Description |
---|---|
void |
addMediatorFor(java.lang.Class<? extends T1> first,
java.lang.Class<? extends T2> second,
java.lang.Class<? extends T3> mediator)
Construct and adds a Mediator to this factory.
|
<S extends T3> |
addMediatorFor(java.lang.Class<? extends T1> first,
java.lang.Class<? extends T2> second,
S mediatorInstance) |
<S1 extends T1,S2 extends T2,S3 extends T3> |
addMediatorFor(S1 first,
S2 second,
S3 mediatorInstance) |
void |
addMediatorFor(java.lang.String first,
java.lang.String second,
java.lang.String mediator)
Construct and adds a Mediator to this factory.
|
void |
clear()
Removes all of the Mediators from this factory.
|
Mediator |
getMediatorFor(java.lang.Class<? extends T1> firstClass,
java.lang.Class<? extends T2> secondClass) |
java.util.Map |
getMediators() |
<S1 extends T1,S2 extends T2> |
getMeditorFor(S1 first,
S2 second)
Gets the Mediator for the given Objects.
|
java.util.Map getMediators()
void addMediatorFor(java.lang.Class<? extends T1> first, java.lang.Class<? extends T2> second, java.lang.Class<? extends T3> mediator)
first
- One of the Classes that the Mediator is used for.second
- The other Class that the Mediator is used for.mediator
- The Class of the Mediator to construct and add to this
factory.void addMediatorFor(java.lang.String first, java.lang.String second, java.lang.String mediator) throws java.lang.ClassNotFoundException
first
- The name of one of the Classes that the Mediator is used
for.second
- The name of the other Class that the Mediator is used for.mediator
- The name of the Class of the Mediator to construct and
add to this factory.java.lang.ClassNotFoundException
- If any of the names are not names of valid
Classes.<S extends T3> void addMediatorFor(java.lang.Class<? extends T1> first, java.lang.Class<? extends T2> second, S mediatorInstance)
<S1 extends T1,S2 extends T2,S3 extends T3> void addMediatorFor(S1 first, S2 second, S3 mediatorInstance)
<S1 extends T1,S2 extends T2> Mediator getMeditorFor(S1 first, S2 second)
S1
- generic for first objectS2
- generic for second objectfirst
- Given first objectsecond
- Given second objectMediator getMediatorFor(java.lang.Class<? extends T1> firstClass, java.lang.Class<? extends T2> secondClass)
firstClass
- Given first classsecondClass
- Given second classvoid clear()