}
return requestPDU;
}
private void createRequestPDU() {
AgentXPDU reqPDU = null;
SnmpRequest request = (SnmpRequest)
((AgentXSetVB)vbs.get(0)).getReferenceSubRequest().getRequest();
switch (request.getPhase()) {
case Request.PHASE_INIT:
case Request.PHASE_1PC:
case Request.PHASE_2PC_PREPARE: {
reqPDU =
new AgentXTestSetPDU(request.getContext(), (VariableBinding[])
vbs.toArray(new VariableBinding[vbs.size()]));
break;
}
case Request.PHASE_2PC_COMMIT: {
reqPDU = new AgentXCommitSetPDU();
break;
}
case Request.PHASE_2PC_CLEANUP: {
reqPDU = new AgentXCleanupSetPDU();
break;
}
default: {
reqPDU = new AgentXUndoSetPDU();
break;
}
}
reqPDU.setSessionID(session.getSessionID());
reqPDU.setTransactionID(request.getTransactionID());
this.requestPDU = reqPDU;
}