Class AdhocOverrides

java.lang.Object
org.snmp4j.mcp.tool.snmp.AdhocOverrides

public final class AdhocOverrides extends Object
Builds an effective SnmpMcpServer.ServerConfiguration.SnmpTargetConfig by applying a map of per-call parameter overrides onto a configured base target.

Overrides are only honoured when the base target has SnmpMcpServer.ServerConfiguration.SnmpTargetConfig.allowAdhocParameterOverwrite() set to true. The address (which embeds the transport type and port) and the targetName can never be overridden — the destination endpoint always remains the one declared in the server configuration. This lets an MCP client run security-negative and robustness tests (wrong community, wrong SNMPv3 credentials, mismatched security level, altered retries/timeout) against a fixed, operator-approved agent endpoint.

The override map mirrors the structure of a single SNMP[] entry in the configuration JSON. Recognised keys:

Any other key — in particular address, targetName or allowAdhocParameterOverwrite — is rejected.
Since:
0.1.0