Cleanup of state managers' interfaces (constructor and init).
[packetcable.git] / packetcable-driver / src / main / java / org / pcmm / rcd / impl / CMTS.java
index 09ae644047cf0700e7439d4ad25d0fba468998d7..4a89bad0e0733d9a740dc43778746299db1a80a8 100644 (file)
@@ -144,79 +144,6 @@ public class CMTS extends AbstractPCMMServer implements ICMTS {
                }
        }
 
-       class PCMMPSReqStateMan extends COPSPepReqStateMan {
-
-               public PCMMPSReqStateMan(final short clientType, final COPSHandle clientHandle) {
-                       super(clientType, clientHandle, new CmtsDataProcessor());
-               }
-
-               @Override
-               protected void processDecision(final COPSDecisionMsg dMsg, final Socket socket) throws COPSPepException {
-            final Map<String, String> removeDecs = new HashMap<>();
-                       final Map<String, String> installDecs = new HashMap<>();
-                       final Map<String, String> errorDecs = new HashMap<>();
-
-                       for (final Set<COPSDecision> copsDecisions : dMsg.getDecisions().values()) {
-                               final COPSDecision cmddecision = copsDecisions.iterator().next();
-
-                               // cmddecision --> we must check whether it is an error!
-                String prid = "";
-                switch (cmddecision.getCommand()) {
-                    case INSTALL:
-                        for (final COPSDecision decision : copsDecisions) {
-                                                       final COPSPrObjBase obj = new COPSPrObjBase(decision.getData().getData());
-                            switch (obj.getSNum()) {
-                                // TODO when there is install request only the PR_PRID
-                                // is git but the ClientSI object containing the PR_EPD
-                                // is null??? this is why the tests fail and so I set
-                                // the assertion to NOT true....
-                                case COPSPrObjBase.PR_PRID:
-                                    prid = obj.getData().str();
-                                    break;
-                                case COPSPrObjBase.PR_EPD:
-                                    installDecs.put(prid, obj.getData().str());
-                                    break;
-                                default:
-                                    break;
-                            }
-                        }
-                    case REMOVE:
-                        for (final COPSDecision decision : copsDecisions) {
-                                                       final COPSPrObjBase obj = new COPSPrObjBase(decision.getData().getData());
-                            switch (obj.getSNum()) {
-                                // TODO when there is install request only the PR_PRID
-                                // is git but the ClientSI object containing the PR_EPD
-                                // is null??? this is why the tests fail and so I set
-                                // the assertion to NOT true....
-                                case COPSPrObjBase.PR_PRID:
-                                    prid = obj.getData().str();
-                                    break;
-                                case COPSPrObjBase.PR_EPD:
-                                    removeDecs.put(prid, obj.getData().str());
-                                    break;
-                                default:
-                                    break;
-                            }
-                        }
-                }
-            }
-
-                       if (_process != null) {
-                               // ** Apply decisions to the configuration
-                               _process.setDecisions(this, removeDecs, installDecs, errorDecs);
-                               _status = Status.ST_DECS;
-                               if (_process.isFailReport(this)) {
-                                       // COPSDebug.out(getClass().getName(),"Sending FAIL Report\n");
-                                       _sender.sendFailReport(_process.getReportData(this));
-                               } else {
-                                       // COPSDebug.out(getClass().getName(),"Sending SUCCESS Report\n");
-                                       _sender.sendSuccessReport(_process.getReportData(this));
-                               }
-                               _status = Status.ST_REPORT;
-                       }
-               }
-       }
-
        class CmtsDataProcessor implements COPSPepDataProcess {
 
                private Map<String, String> removeDecs;