forked from martint/jmxutils
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MBeanModule.newExporter() to ease exporting inside other modules.
Returns ExportBuilder() that wraps a Multibinder<Mapping>. This is to avoid problems where you install() a MBeanModule inside another module that doesn't bind MBeanServer; MBeanModule implicitly requires a bound MBeanServer.
- Loading branch information
Showing
5 changed files
with
90 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
/target | ||
/*.iws | ||
/test-output | ||
.classpath | ||
.project | ||
.settings |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.weakref.jmx.guice; | ||
|
||
import com.google.inject.multibindings.Multibinder; | ||
|
||
public class ExportBuilder { | ||
private final Multibinder<Mapping> binder; | ||
|
||
ExportBuilder(Multibinder<Mapping> binder) { | ||
this.binder = binder; | ||
} | ||
|
||
public AnnotatedExportBuilder export(Class<?> clazz) { | ||
return new AnnotatedExportBuilder(binder, clazz); | ||
} | ||
} |
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