bridge/JabExtBridge.java, see
docs/requirements/mathscinet.md, req~mathscinet.sync.transport~1).
The bridge is discovered, not configured: it writes a small JSON file
naming its ephemeral port and a token file once it is running. If that
file is absent (extension not installed, or not started), every method
here fails silently by returning an empty Optional — the bridge is an
optional enhancement, never a hard dependency for identifier editing.
| Modifier and Type | Class and Description |
|---|---|
| private static record | |
| public static record | BrowserExtensionBridgeClient.
Result of a successful |
| Modifier and Type | Field and Description |
|---|---|
| private final Path | |
| private final HttpClient | |
| private static final Logger | |
| private static final ObjectMapper | |
| private static final String | |
| private static final Duration |
| Access | Constructor and Description |
|---|---|
| public | |
| pack-priv | BrowserExtensionBridgeClient(Path discoveryDirectory)
Visible for tests, to point at a temporary discovery directory instead of the real OS-specific one. |
| Modifier and Type | Method and Description |
|---|---|
| private static Path | |
| private static Path | defaultDiscoveryDirectory()
Mirrors the path resolution in the JabRef Browser Extension's
|
| public Optional | openMathSciNet(String mrNumber)
Asks the browser extension to open (or focus and navigate) the one tab it
keeps for this feature to the MathSciNet page for |
| private Optional |
| discoveryDirectory | back to summary |
|---|---|
| private final Path discoveryDirectory | |
| httpClient | back to summary |
|---|---|
| private final HttpClient httpClient | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| MAPPER | back to summary |
|---|---|
| private static final ObjectMapper MAPPER | |
| PROVIDER_NAME | back to summary |
|---|---|
| private static final String PROVIDER_NAME | |
| REQUEST_TIMEOUT | back to summary |
|---|---|
| private static final Duration REQUEST_TIMEOUT | |
| BrowserExtensionBridgeClient | back to summary |
|---|---|
| public BrowserExtensionBridgeClient() | |
| BrowserExtensionBridgeClient | back to summary |
|---|---|
| pack-priv BrowserExtensionBridgeClient(Path discoveryDirectory) Visible for tests, to point at a temporary discovery directory instead of the real OS-specific one. | |
| configBase | back to summary |
|---|---|
| private static Path configBase() | |
| defaultDiscoveryDirectory | back to summary |
|---|---|
| private static Path defaultDiscoveryDirectory() Mirrors the path resolution in the JabRef Browser Extension's
| |
| openMathSciNet | back to summary |
|---|---|
| public Optional Asks the browser extension to open (or focus and navigate) the one tab it
keeps for this feature to the MathSciNet page for | |
| readDiscovery | back to summary |
|---|---|
| private Optional | |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final String |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public final int | |
| public int | |
| public String | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| port | back to summary |
|---|---|
| private final int port Record Component accessed by port(). | |
| token | back to summary |
|---|---|
| private final String token Record Component accessed by token(). | |
| Discovery | back to summary |
|---|---|
| private Discovery(int port, String token) | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| port | back to summary |
|---|---|
| public int port() Record Component getter of port. | |
| token | back to summary |
|---|---|
| public String token() Record Component getter of token. | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |
/v1/mathscinet/open call.
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public final int | |
| public int | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| action | back to summary |
|---|---|
| private final String action Record Component accessed by action(). either | |
| tabId | back to summary |
|---|---|
| private final int tabId Record Component accessed by tabId(). the browser's id for the tab, for diagnostics only | |
| MathSciNetOpenResult | back to summary |
|---|---|
| public MathSciNetOpenResult(String action, int tabId) | |
| action | back to summary |
|---|---|
| public String action() Record Component getter of action.
| |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| tabId | back to summary |
|---|---|
| public int tabId() Record Component getter of tabId.
| |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |