|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.snmp4j.util.DefaultPDUFactory
public class DefaultPDUFactory
The DefaultPDUFactory
is a default implementation of the
PDUFactory
interface. It creates PDUs depending on the
target's message processing model. That is, a PDUv1
instance is
created for a SNMPv1 target whereas a ScopedPDU
is created
for a SNMPv3 target. In all other cases a PDU
instance is created.
Constructor Summary | |
---|---|
DefaultPDUFactory()
Creates a PDU factory for the PDU.GET PDU type. |
|
DefaultPDUFactory(int pduType)
Creates a PDU factory for the specified PDU type. |
Method Summary | |
---|---|
static PDU |
createPDU(int targetVersion)
Create a PDU instance for the specified SNMP version. |
PDU |
createPDU(Target target)
Create a PDU instance for the supplied target. |
static PDU |
createPDU(Target target,
int pduType)
Create a PDU instance for the supplied target. |
int |
getPduType()
|
void |
setPduType(int pduType)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultPDUFactory()
PDU.GET
PDU type.
public DefaultPDUFactory(int pduType)
pduType
- a PDU type as specified by PDU
.Method Detail |
---|
public void setPduType(int pduType)
public int getPduType()
public PDU createPDU(Target target)
PDU
instance for the supplied target.
createPDU
in interface PDUFactory
target
- the Target
where the PDU to be created will be
sent.
public static PDU createPDU(Target target, int pduType)
PDU
instance for the supplied target.
target
- the Target
where the PDU to be created will be
sent.pduType
- a PDU type as specified by PDU
.
public static PDU createPDU(int targetVersion)
PDU
instance for the specified SNMP version.
targetVersion
- a SNMP version as defined by SnmpConstants
.
|
Copyright 2005-2010 Frank Fock (SNMP4J.org) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |