org.snmp4j.agent.agentx
Class AgentXProtocol

java.lang.Object
  extended by org.snmp4j.agent.agentx.AgentXProtocol
All Implemented Interfaces:
org.snmp4j.transport.MessageLengthDecoder

public class AgentXProtocol
extends java.lang.Object
implements org.snmp4j.transport.MessageLengthDecoder


Field Summary
static int AGENTX_BADVER
           
static int AGENTX_DISCONNECT
           
static int AGENTX_DUPLICATE_REGISTRATION
           
static int AGENTX_DUPMAP
           
static int AGENTX_ERROR
           
static int AGENTX_INDEX_ALREADY_ALLOCATED
           
static int AGENTX_INDEX_NONE_AVAILABLE
           
static int AGENTX_INDEX_NOT_ALLOCATED
           
static int AGENTX_INDEX_WRONG_TYPE
           
protected static int AGENTX_INT_SIZE
           
static int AGENTX_NOREG
           
static int AGENTX_NOT_OPEN
           
static int AGENTX_OPEN_FAILED
           
static int AGENTX_PARSE_ERROR
           
static int AGENTX_PROCESSING_ERROR
           
static int AGENTX_REQUEST_DENIED
           
static int AGENTX_SUCCESS
           
static int AGENTX_TIMEOUT
           
static int AGENTX_UNKNOWN_AGENTCAPS
           
static int AGENTX_UNKNOWN_REGISTRATION
           
static int AGENTX_UNSUPPORTED_CONTEXT
           
static int DEFAULT_MAX_CONSECUTIVE_TIMEOUTS
           
static int DEFAULT_MAX_PARSE_ERRORS
           
static byte DEFAULT_PRIORITY
           
static int DEFAULT_TIMEOUT_SECONDS
           
static int FLAG_ALLOCATE_INDEX
           
static byte FLAG_ANY_INDEX
           
static byte FLAG_INSTANCE_REGISTRATION
           
static byte FLAG_NETWORK_BYTE_ORDER
           
static byte FLAG_NEW_INDEX
           
static byte FLAG_NON_DEFAULT_CONTEXT
           
static int HEADER_LENGTH
           
static int MAX_TIMEOUT_SECONDS
           
static byte REASON_BY_MANAGER
           
static byte REASON_OTHER
           
static byte REASON_PARSE_ERROR
           
static byte REASON_PROTOCOL_ERROR
           
static byte REASON_SHUTDOWN
           
static byte REASON_TIMEOUTS
           
static byte VERSION_1_0
           
 
Constructor Summary
AgentXProtocol()
           
 
Method Summary
static AgentXMessageHeader decodeHeader(java.nio.ByteBuffer buf)
           
static org.snmp4j.smi.OctetString decodeOctetString(java.nio.ByteBuffer buf)
           
static boolean decodeOID(java.nio.ByteBuffer buf, org.snmp4j.smi.OID oid)
           
static org.snmp4j.agent.MOScope[] decodeRanges(java.nio.ByteBuffer buf)
           
static org.snmp4j.agent.MOScope[] decodeRanges(java.nio.ByteBuffer buf, boolean lowerAlwaysIncluded)
           
static org.snmp4j.smi.VariableBinding[] decodeVariableBindings(java.nio.ByteBuffer buf)
           
static org.snmp4j.smi.Variable decodeVariableData(java.nio.ByteBuffer buf, int syntax)
           
static void encodeOctetString(java.nio.ByteBuffer buf, org.snmp4j.smi.OctetString os)
           
static void encodeOID(java.nio.ByteBuffer buf, org.snmp4j.smi.OID oid, boolean include)
           
static void encodeRanges(java.nio.ByteBuffer buf, org.snmp4j.agent.MOScope[] searchRanges)
           
static void encodeVariableData(java.nio.ByteBuffer buf, org.snmp4j.smi.Variable v)
           
static void encodeVaribleBindings(java.nio.ByteBuffer buf, org.snmp4j.smi.VariableBinding[] vbs)
           
 org.snmp4j.transport.MessageLength getMessageLength(java.nio.ByteBuffer buf)
           
 int getMinHeaderLength()
           
static int getOctetStringLength(int length)
           
static int getOIDLength(int[] oid)
           
static int getOIDLength(org.snmp4j.smi.OID oid)
           
static int getRangesLength(org.snmp4j.agent.MOScope[] ranges)
           
static int getVariableBindingsLength(org.snmp4j.smi.VariableBinding[] vbs)
           
static int getVariableDataLength(org.snmp4j.smi.Variable v)
           
static boolean isNonDefaultContextsEnabled()
           
static void setNonDefaultContextsEnabled(boolean enabled)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION_1_0

public static final byte VERSION_1_0
See Also:
Constant Field Values

REASON_OTHER

public static final byte REASON_OTHER
See Also:
Constant Field Values

REASON_PARSE_ERROR

public static final byte REASON_PARSE_ERROR
See Also:
Constant Field Values

REASON_PROTOCOL_ERROR

public static final byte REASON_PROTOCOL_ERROR
See Also:
Constant Field Values

REASON_TIMEOUTS

public static final byte REASON_TIMEOUTS
See Also:
Constant Field Values

REASON_SHUTDOWN

public static final byte REASON_SHUTDOWN
See Also:
Constant Field Values

REASON_BY_MANAGER

public static final byte REASON_BY_MANAGER
See Also:
Constant Field Values

AGENTX_OPEN_FAILED

public static final int AGENTX_OPEN_FAILED
See Also:
Constant Field Values

AGENTX_NOT_OPEN

public static final int AGENTX_NOT_OPEN
See Also:
Constant Field Values

AGENTX_INDEX_WRONG_TYPE

public static final int AGENTX_INDEX_WRONG_TYPE
See Also:
Constant Field Values

AGENTX_INDEX_ALREADY_ALLOCATED

public static final int AGENTX_INDEX_ALREADY_ALLOCATED
See Also:
Constant Field Values

AGENTX_INDEX_NONE_AVAILABLE

public static final int AGENTX_INDEX_NONE_AVAILABLE
See Also:
Constant Field Values

AGENTX_INDEX_NOT_ALLOCATED

public static final int AGENTX_INDEX_NOT_ALLOCATED
See Also:
Constant Field Values

AGENTX_UNSUPPORTED_CONTEXT

public static final int AGENTX_UNSUPPORTED_CONTEXT
See Also:
Constant Field Values

AGENTX_DUPLICATE_REGISTRATION

public static final int AGENTX_DUPLICATE_REGISTRATION
See Also:
Constant Field Values

AGENTX_UNKNOWN_REGISTRATION

public static final int AGENTX_UNKNOWN_REGISTRATION
See Also:
Constant Field Values

AGENTX_UNKNOWN_AGENTCAPS

public static final int AGENTX_UNKNOWN_AGENTCAPS
See Also:
Constant Field Values

AGENTX_PARSE_ERROR

public static final int AGENTX_PARSE_ERROR
See Also:
Constant Field Values

AGENTX_REQUEST_DENIED

public static final int AGENTX_REQUEST_DENIED
See Also:
Constant Field Values

AGENTX_PROCESSING_ERROR

public static final int AGENTX_PROCESSING_ERROR
See Also:
Constant Field Values

AGENTX_SUCCESS

public static final int AGENTX_SUCCESS
See Also:
Constant Field Values

AGENTX_ERROR

public static final int AGENTX_ERROR
See Also:
Constant Field Values

AGENTX_DISCONNECT

public static final int AGENTX_DISCONNECT
See Also:
Constant Field Values

AGENTX_BADVER

public static final int AGENTX_BADVER
See Also:
Constant Field Values

AGENTX_TIMEOUT

public static final int AGENTX_TIMEOUT
See Also:
Constant Field Values

AGENTX_NOREG

public static final int AGENTX_NOREG
See Also:
Constant Field Values

AGENTX_DUPMAP

public static final int AGENTX_DUPMAP
See Also:
Constant Field Values

FLAG_INSTANCE_REGISTRATION

public static final byte FLAG_INSTANCE_REGISTRATION
See Also:
Constant Field Values

FLAG_NEW_INDEX

public static final byte FLAG_NEW_INDEX
See Also:
Constant Field Values

FLAG_ANY_INDEX

public static final byte FLAG_ANY_INDEX
See Also:
Constant Field Values

FLAG_NON_DEFAULT_CONTEXT

public static final byte FLAG_NON_DEFAULT_CONTEXT
See Also:
Constant Field Values

FLAG_NETWORK_BYTE_ORDER

public static final byte FLAG_NETWORK_BYTE_ORDER
See Also:
Constant Field Values

AGENTX_INT_SIZE

protected static final int AGENTX_INT_SIZE
See Also:
Constant Field Values

HEADER_LENGTH

public static final int HEADER_LENGTH
See Also:
Constant Field Values

DEFAULT_TIMEOUT_SECONDS

public static final int DEFAULT_TIMEOUT_SECONDS
See Also:
Constant Field Values

DEFAULT_MAX_CONSECUTIVE_TIMEOUTS

public static final int DEFAULT_MAX_CONSECUTIVE_TIMEOUTS
See Also:
Constant Field Values

DEFAULT_MAX_PARSE_ERRORS

public static final int DEFAULT_MAX_PARSE_ERRORS
See Also:
Constant Field Values

MAX_TIMEOUT_SECONDS

public static final int MAX_TIMEOUT_SECONDS
See Also:
Constant Field Values

DEFAULT_PRIORITY

public static final byte DEFAULT_PRIORITY
See Also:
Constant Field Values

FLAG_ALLOCATE_INDEX

public static final int FLAG_ALLOCATE_INDEX
See Also:
Constant Field Values
Constructor Detail

AgentXProtocol

public AgentXProtocol()
Method Detail

encodeOID

public static void encodeOID(java.nio.ByteBuffer buf,
                             org.snmp4j.smi.OID oid,
                             boolean include)

getOIDLength

public static int getOIDLength(org.snmp4j.smi.OID oid)

getOIDLength

public static int getOIDLength(int[] oid)

decodeOID

public static boolean decodeOID(java.nio.ByteBuffer buf,
                                org.snmp4j.smi.OID oid)

encodeVariableData

public static void encodeVariableData(java.nio.ByteBuffer buf,
                                      org.snmp4j.smi.Variable v)

getVariableDataLength

public static int getVariableDataLength(org.snmp4j.smi.Variable v)

decodeVariableData

public static org.snmp4j.smi.Variable decodeVariableData(java.nio.ByteBuffer buf,
                                                         int syntax)

decodeVariableBindings

public static org.snmp4j.smi.VariableBinding[] decodeVariableBindings(java.nio.ByteBuffer buf)

encodeVaribleBindings

public static void encodeVaribleBindings(java.nio.ByteBuffer buf,
                                         org.snmp4j.smi.VariableBinding[] vbs)

encodeRanges

public static void encodeRanges(java.nio.ByteBuffer buf,
                                org.snmp4j.agent.MOScope[] searchRanges)

getOctetStringLength

public static int getOctetStringLength(int length)

encodeOctetString

public static void encodeOctetString(java.nio.ByteBuffer buf,
                                     org.snmp4j.smi.OctetString os)

decodeOctetString

public static org.snmp4j.smi.OctetString decodeOctetString(java.nio.ByteBuffer buf)

decodeRanges

public static org.snmp4j.agent.MOScope[] decodeRanges(java.nio.ByteBuffer buf)

decodeRanges

public static org.snmp4j.agent.MOScope[] decodeRanges(java.nio.ByteBuffer buf,
                                                      boolean lowerAlwaysIncluded)

getRangesLength

public static int getRangesLength(org.snmp4j.agent.MOScope[] ranges)

getVariableBindingsLength

public static int getVariableBindingsLength(org.snmp4j.smi.VariableBinding[] vbs)

getMinHeaderLength

public int getMinHeaderLength()
Specified by:
getMinHeaderLength in interface org.snmp4j.transport.MessageLengthDecoder

getMessageLength

public org.snmp4j.transport.MessageLength getMessageLength(java.nio.ByteBuffer buf)
                                                    throws java.io.IOException
Specified by:
getMessageLength in interface org.snmp4j.transport.MessageLengthDecoder
Throws:
java.io.IOException

decodeHeader

public static final AgentXMessageHeader decodeHeader(java.nio.ByteBuffer buf)
                                              throws java.io.IOException
Throws:
java.io.IOException

setNonDefaultContextsEnabled

public static void setNonDefaultContextsEnabled(boolean enabled)

isNonDefaultContextsEnabled

public static boolean isNonDefaultContextsEnabled()

Copyright 2005-2011 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.