-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Ordered interface to MessageProducerManager and Injector SPI
- Loading branch information
Showing
6 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,10 +16,12 @@ | |
*/ | ||
package com.ctrip.framework.apollo.internals; | ||
|
||
import com.ctrip.framework.apollo.core.spi.Ordered; | ||
|
||
/** | ||
* @author Jason Song([email protected]) | ||
*/ | ||
public interface Injector { | ||
public interface Injector extends Ordered { | ||
|
||
/** | ||
* Returns the appropriate instance for the given injection type | ||
|
@@ -30,4 +32,9 @@ public interface Injector { | |
* Returns the appropriate instance for the given injection type and name | ||
*/ | ||
<T> T getInstance(Class<T> clazz, String name); | ||
|
||
@Override | ||
default int getOrder() { | ||
return 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,12 +16,19 @@ | |
*/ | ||
package com.ctrip.framework.apollo.tracer.spi; | ||
|
||
import com.ctrip.framework.apollo.core.spi.Ordered; | ||
|
||
/** | ||
* @author Jason Song([email protected]) | ||
*/ | ||
public interface MessageProducerManager { | ||
public interface MessageProducerManager extends Ordered { | ||
/** | ||
* @return the message producer | ||
*/ | ||
MessageProducer getProducer(); | ||
|
||
@Override | ||
default int getOrder() { | ||
return 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters