/** * Gets the IP address of the originator system of this SNMPv1 trap. * If this value is 0.0.0.0 (the recommended default), then the address * of the peer SNMP entity should be extracted from the {@link Target} * object associated with this PDU. * * @return * an IpAddress instance. * @throws UnsupportedOperationException if the type of this PDU is not * {@link PDU#V1TRAP}. */ public org.snmp4j.smi.IpAddress getAgentAddress() { checkV1TRAP(); return agentAddress; }
/** * Sets the {@code TimeTicks} value of the trap sender's notion of * its sysUpTime value when this trap has been generated. * * @param timeStamp * a long value. */ public void setTimestamp(long timeStamp) { checkV1TRAP(); this.timestamp.setValue(timeStamp); }
/** * Sets the <code>TimeTicks</code> value of the trap sender's notion of * its sysUpTime value when this trap has been generated. * * @param timeStamp * a long value. */ public void setTimestamp(long timeStamp) { checkV1TRAP(); this.timestamp.setValue(timeStamp); }
/** * Gets the generic trap ID. If this value is ENTERPRISE_SPECIFIC(6), then * {@link #getSpecificTrap()} will return the trap ID of the enterprise * specific trap. * @return * an Integer32 instance with a value between 0 and 6. * @throws UnsupportedOperationException if the type of this PDU is not * {@link PDU#V1TRAP}. */ public int getGenericTrap() { checkV1TRAP(); return genericTrap.getValue(); }
/** * Gets the specific trap ID. If this value is set, * {@link #getGenericTrap()} must return ENTERPRISE_SPECIFIC(6). * @return * an integer value > 0. * @throws UnsupportedOperationException if the type of this PDU is not * {@link PDU#V1TRAP}. */ public int getSpecificTrap() { checkV1TRAP(); return specificTrap.getValue(); } /**
/** * Sets the generic trap ID. If this value is ENTERPRISE_SPECIFIC(6), then * {@link #setSpecificTrap} must be used to set the trap ID of the enterprise * specific trap. * @param genericTrap * an integer value >= 0 and <= 6. * @throws UnsupportedOperationException if the type of this PDU is not * {@link PDU#V1TRAP}. */ public void setGenericTrap(int genericTrap) { checkV1TRAP(); this.genericTrap.setValue(genericTrap); }
/** * Gets the generic trap ID. If this value is ENTERPRISE_SPECIFIC(6), then * {@link #getSpecificTrap()} will return the trap ID of the enterprise * specific trap. * @return * an Integer32 instance with a value between 0 and 6. * @throws UnsupportedOperationException if the type of this PDU is not * {@link PDU#V1TRAP}. */ public int getGenericTrap() { checkV1TRAP(); return genericTrap.getValue(); }
/** * Gets the specific trap ID. If this value is set, * {@link #getGenericTrap()} must return ENTERPRISE_SPECIFIC(6). * @return * an integer value > 0. * @throws UnsupportedOperationException if the type of this PDU is not * {@link PDU#V1TRAP}. */ public int getSpecificTrap() { checkV1TRAP(); return specificTrap.getValue(); } /**
/** * Sets the {@code TimeTicks} value of the trap sender's notion of * its sysUpTime value when this trap has been generated. * * @param timeStamp * a long value. */ public void setTimestamp(long timeStamp) { checkV1TRAP(); this.timestamp.setValue(timeStamp); }
/** * Gets the {@code TimeTicks} value of the trap sender's notion of * its sysUpTime value when this trap has been generated. * * @return * a long value. * @throws UnsupportedOperationException if the type of this PDU is not * {@link PDU#V1TRAP}. */ public long getTimestamp() { checkV1TRAP(); return timestamp.getValue(); }
/** * Gets the generic trap ID. If this value is ENTERPRISE_SPECIFIC(6), then * {@link #getSpecificTrap()} will return the trap ID of the enterprise * specific trap. * @return * an Integer32 instance with a value between 0 and 6. * @throws UnsupportedOperationException if the type of this PDU is not * {@link PDU#V1TRAP}. */ public int getGenericTrap() { checkV1TRAP(); return genericTrap.getValue(); }
/** * Sets the generic trap ID. If this value is ENTERPRISE_SPECIFIC(6), then * {@link #setSpecificTrap} must be used to set the trap ID of the enterprise * specific trap. * @param genericTrap * an integer value >= 0 and <= 6. * @throws UnsupportedOperationException if the type of this PDU is not * {@link PDU#V1TRAP}. */ public void setGenericTrap(int genericTrap) { checkV1TRAP(); this.genericTrap.setValue(genericTrap); }
/** * Sets the specific trap ID. If this value is set, * {@link #setGenericTrap(int genericTrap)} must be called with value * {@link #ENTERPRISE_SPECIFIC}. * * @param specificTrap * an integer value > 0. * @throws UnsupportedOperationException if the type of this PDU is not * {@link PDU#V1TRAP}. */ public void setSpecificTrap(int specificTrap) { checkV1TRAP(); this.specificTrap.setValue(specificTrap); }
/** * Sets the specific trap ID. If this value is set, * {@link #setGenericTrap(int genericTrap)} must be called with value * {@link #ENTERPRISE_SPECIFIC}. * * @param specificTrap * an integer value > 0. * @throws UnsupportedOperationException if the type of this PDU is not * {@link PDU#V1TRAP}. */ public void setSpecificTrap(int specificTrap) { checkV1TRAP(); this.specificTrap.setValue(specificTrap); }
/** * Sets the IP address of the originator system of this SNMPv1 trap. * The default value is 0.0.0.0, which should be only overriden in special * cases, for example when forwarding SNMPv1 traps through a SNMP proxy. * @param agentAddress * a {@code IpAddress} instance. * @throws UnsupportedOperationException if the type of this PDU is not * {@link PDU#V1TRAP}. */ public void setAgentAddress(org.snmp4j.smi.IpAddress agentAddress) { checkV1TRAP(); checkNull(agentAddress); this.agentAddress = agentAddress; }
/** * Sets the generic trap ID. If this value is ENTERPRISE_SPECIFIC(6), then * {@link #setSpecificTrap} must be used to set the trap ID of the enterprise * specific trap. * @param genericTrap * an integer value >= 0 and <= 6. * @throws UnsupportedOperationException if the type of this PDU is not * {@link PDU#V1TRAP}. */ public void setGenericTrap(int genericTrap) { checkV1TRAP(); this.genericTrap.setValue(genericTrap); }
/** * Gets the specific trap ID. If this value is set, * {@link #getGenericTrap()} must return ENTERPRISE_SPECIFIC(6). * @return * an integer value > 0. * @throws UnsupportedOperationException if the type of this PDU is not * {@link PDU#V1TRAP}. */ public int getSpecificTrap() { checkV1TRAP(); return specificTrap.getValue(); } /**
/** * Gets the {@code TimeTicks} value of the trap sender's notion of * its sysUpTime value when this trap has been generated. * * @return * a long value. * @throws UnsupportedOperationException if the type of this PDU is not * {@link PDU#V1TRAP}. */ public long getTimestamp() { checkV1TRAP(); return timestamp.getValue(); }
/** * Gets the <code>TimeTicks</code> value of the trap sender's notion of * its sysUpTime value when this trap has been generated. * * @return * a long value. * @throws UnsupportedOperationException if the type of this PDU is not * {@link PDU#V1TRAP}. */ public long getTimestamp() { checkV1TRAP(); return timestamp.getValue(); }
/** * Sets the IP address of the originator system of this SNMPv1 trap. * The default value is 0.0.0.0, which should be only overriden in special * cases, for example when forwarding SNMPv1 traps through a SNMP proxy. * @param agentAddress * a {@code IpAddress} instance. * @throws UnsupportedOperationException if the type of this PDU is not * {@link PDU#V1TRAP}. */ public void setAgentAddress(org.snmp4j.smi.IpAddress agentAddress) { checkV1TRAP(); checkNull(agentAddress); this.agentAddress = agentAddress; }