package com.dy.common.mw.protocol; 
 | 
  
 | 
/** 
 | 
 * 处理出错 
 | 
 */ 
 | 
public class MidResultError implements MidResult{ 
 | 
  
 | 
    public static final long serialVersionUID; 
 | 
    static { 
 | 
        serialVersionUID = 201606271057001L; 
 | 
    } 
 | 
  
 | 
    public String protocolName ;//协议名称 
 | 
    public String rtuAddr ;//Rtu地址,注意rtuAddr可能为null 
 | 
    public String message ;//出错消息 
 | 
    public Exception e ;//异常 
 | 
     
 | 
    public MidResultError(String protocolName, String rtuAddr, String message, Exception e){ 
 | 
        this.protocolName = protocolName ; 
 | 
        this.rtuAddr = rtuAddr ; 
 | 
        this.message = message ; 
 | 
        this.e = e ; 
 | 
    } 
 | 
     
 | 
    @Override 
 | 
    public void action() { 
 | 
         ProtocolUnit.getInstance().adapter.getSingleActionError(this.protocolName).doAction(this);  
 | 
    } 
 | 
  
 | 
} 
 |