com.sun.management.snmp.agent
Interface SnmpTrapForwarderMBean

All Known Implementing Classes:
SnmpTrapForwarder

public interface SnmpTrapForwarderMBean

This MBean interface allows the remote manageability of the trap forwarding feature.

Since:
Java DMK 5.1

Method Summary
 void addV1Target(String address, int port, String communityString)
          Add a target to which SNMP V1 traps will be forwarded.
 void addV1Target(String address, String communityString)
          Add a target to which SNMP V1 traps will be forwarded.
 void addV2Target(String address, int port, String communityString)
          Add a target to which SNMP V2 traps will be forwarded.
 void addV2Target(String address, String communityString)
          Add a target to which SNMP V2 traps will be forwarded.
 void addV3Target(String address, int port, String principal, String contextName, int securityLevel)
          Add a target to which SNMP V3 traps will be forwarded.
 void addV3Target(String address, String principal, String contextName, int securityLevel)
          Add a target to which SNMP V3 traps will be forwarded.
 boolean isInetAddressAclUsed()
          Says if The SnmpTrapForwarder parses or not the InetAddressAcl when forwarding traps.
 boolean isV1Activated()
          Returns true if SNMP V1 forwarding is activated.
 boolean isV2Activated()
          Returns true if SNMP V2 forwarding is activated.
 boolean isV3Activated()
          Returns true if SNMP V3 forwarding is activated.
 boolean removeV1Target(String address)
          Remove the first occurrence of the passed target.
 boolean removeV1Target(String address, int port)
          Remove the first occurrence of the passed target.
 boolean removeV2Target(String address)
          Remove the first occurrence of the passed target.
 boolean removeV2Target(String address, int port)
          Remove the first occurrence of the passed target.
 boolean removeV3Target(String address)
          Remove the first occurrence of the passed target.
 boolean removeV3Target(String address, int port)
          Remove the first occurrence of the passed target.
 void setInetAddressAclUsed(boolean use)
          By default if an InetAddressAcl file is loaded by the SNMP adaptor, it will be parsed in order to find manager IP addresses.
 void snmpV1forwarding(boolean status)
          Activate or deactivate SNMP V1 trap forwarding.
 void snmpV2forwarding(boolean status)
          Activate or deactivate SNMP V2 trap forwarding.
 void snmpV3forwarding(boolean status)
          Activate or deactivate SNMP V3 trap forwarding.
 

Method Detail

removeV1Target

boolean removeV1Target(String address)
Remove the first occurrence of the passed target.

Parameters:
address - The target address (IP or name).
Returns:
True removed, false target not present.

removeV2Target

boolean removeV2Target(String address)
Remove the first occurrence of the passed target.

Parameters:
address - The target address (IP or name).
Returns:
True removed, false target not present.

removeV3Target

boolean removeV3Target(String address)
Remove the first occurrence of the passed target.

Parameters:
address - The target address (IP or name).
Returns:
True removed, false target not present.

removeV1Target

boolean removeV1Target(String address,
                       int port)
Remove the first occurrence of the passed target.

Parameters:
address - The target address (IP or name).
port - The port to which the trap is sent.
Returns:
True removed, false target not present.

removeV2Target

boolean removeV2Target(String address,
                       int port)
Remove the first occurrence of the passed target.

Parameters:
address - The target address (IP or name).
port - The port to which the trap is sent.
Returns:
True removed, false target not present.

removeV3Target

boolean removeV3Target(String address,
                       int port)
Remove the first occurrence of the passed target.

Parameters:
address - The target address (IP or name).
port - The port to which the trap is sent.
Returns:
True removed, false target not present.

addV1Target

void addV1Target(String address,
                 int port,
                 String communityString)
Add a target to which SNMP V1 traps will be forwarded. WARNING: When specifying a port to send trap, the whole SnmpV3AdaptorServer is impacted. The port changing is effective when sending the trap. Concurrent calls to SnmpV3AdaptorServer trap API can lead to unpredictable behavior.

The same target can be added multiple times.

Parameters:
address - The target address (IP or name);
port - The port to which the trap is sent. If port == -1, the adaptor port is used.
communityString - The associated community string.
Throws:
IllegalArgumentException - If the the port is == 0 or the address is invalid (cause field set to java.net.UnknownHostException if JDK Version >= 1.4).

addV2Target

void addV2Target(String address,
                 int port,
                 String communityString)
Add a target to which SNMP V2 traps will be forwarded. WARNING: When specifying a port to send trap, the whole SnmpV3AdaptorServer is impacted. The port changing is effective when sending the trap. Concurrent calls to SnmpV3AdaptorServer trap API can lead to unpredictable behavior.

The same target can be added multiple times.

Parameters:
address - The target address (IP or name);
port - The port to which the trap is sent. If port == -1, the adaptor port is used.
communityString - The associated community string.
Throws:
IllegalArgumentException - If the the port is == 0 or the address is invalid (cause field set to java.net.UnknownHostException if JDK Version >= 1.4).

addV3Target

void addV3Target(String address,
                 int port,
                 String principal,
                 String contextName,
                 int securityLevel)
Add a target to which SNMP V3 traps will be forwarded. WARNING: When specifying a port to send trap, the whole SnmpV3AdaptorServer is impacted. The port changing is effective when sending the trap. Concurrent calls to SnmpV3AdaptorServer trap API can lead to unpredictable behavior.

The same target can be added multiple times.

Parameters:
address - The target address (IP or name);
port - The port to which the trap is sent. If port == -1, the adaptor port is used.
principal - The user.
contextName - The context name.
securityLevel - The security level.
Throws:
IllegalArgumentException - If the the port is == 0, if the principal is null, if the security level is not valid or if the address is invalid (cause field set to java.net.UnknownHostException if JDK Version >= 1.4).

addV1Target

void addV1Target(String address,
                 String communityString)
Add a target to which SNMP V1 traps will be forwarded.

The same target can be added multiple times.

Parameters:
address - The target address (IP or name);
communityString - The associated community string.
Throws:
IllegalArgumentException - If the address is invalid (cause field set to java.net.UnknownHostException if JDK Version >= 1.4).

addV2Target

void addV2Target(String address,
                 String communityString)
Add a target to which SNMP V2 traps will be forwarded.

The same target can be added multiple times.

Parameters:
address - The target address (IP or name);
communityString - The associated community string.
Throws:
IllegalArgumentException - If the address is invalid (cause field set to java.net.UnknownHostException if JDK Version >= 1.4).

addV3Target

void addV3Target(String address,
                 String principal,
                 String contextName,
                 int securityLevel)
Add a target to which SNMP V3 traps will be forwarded.

The same target can be added multiple times.

Parameters:
address - The target address (IP or name);
principal - The user.
contextName - The context name.
Throws:
IllegalArgumentException - If the principal is null, if the security level is not valid or if the address is invalid (cause field set to java.net.UnknownHostException if JDK Version >= 1.4).

isV1Activated

boolean isV1Activated()
Returns true if SNMP V1 forwarding is activated.


isV2Activated

boolean isV2Activated()
Returns true if SNMP V2 forwarding is activated.


isV3Activated

boolean isV3Activated()
Returns true if SNMP V3 forwarding is activated.


snmpV1forwarding

void snmpV1forwarding(boolean status)
Activate or deactivate SNMP V1 trap forwarding. By default is false.

If V1 target addresses have been provided, you don't need to activate V1. If V1 is activated and no targets are provided, localhost and(or) IPAcl are used as the default targets.

Parameters:
status - True activates it, false deactivates it.

snmpV2forwarding

void snmpV2forwarding(boolean status)
Activate or deactivate SNMP V2 trap forwarding. By default is false.

If V2 target addresses have been provided, you don't need to activate V2. If V2 is activated and no targets are provided, localhost and(or) IPAcl are used as the default targets.

Parameters:
status - True activates it, false deactivates it.

snmpV3forwarding

void snmpV3forwarding(boolean status)
Activate or deactivate SNMP V3 trap forwarding. By default is false.

If V3 target addresses have been provided, you don't need to activate V3. If V3 is activated and no targets are provided, localhost and(or) IPAcl are used as the default targets.

Parameters:
status - True activates it, false deactivates it.

setInetAddressAclUsed

void setInetAddressAclUsed(boolean use)
By default if an InetAddressAcl file is loaded by the SNMP adaptor, it will be parsed in order to find manager IP addresses. This parsing is done when forwarding in SNMP V1 V2 and V3. In the case of SNMP V3 forwarding, the parsed targets are used only if the SNMP V3 parameters have been provided (via setV3Parameters method).

If you provided some targets (addV1/2/3Target methods) they are also used when forwarding traps. The set of targets is InetAddressAcl trap blocks + added targets. If you don't use InetAddressAcl (passing false to this method), only the set of added targets is used.

Parameters:
use - The use of InetAddressAcl

isInetAddressAclUsed

boolean isInetAddressAclUsed()
Says if The SnmpTrapForwarder parses or not the InetAddressAcl when forwarding traps.

Returns:
true the file is parsed, false the file is not parsed.

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.