1 57 58 package org.apache.soap.server; 59 60 import java.util.*; 61 import org.apache.soap.*; 62 63 68 69 public class SOAPFaultRouter { 70 SOAPFaultListener[] faultListener; 71 72 75 public void setFaultListener(SOAPFaultListener[] _faultListener) {faultListener = _faultListener;} 76 77 80 public void setFaultListener(int index, SOAPFaultListener _faultListener) {faultListener[index] = _faultListener;} 81 82 85 public SOAPFaultListener[] getFaultListener() {return faultListener;} 86 87 90 public SOAPFaultListener getFaultListener(int index) {return faultListener[index];} 91 92 95 public void notifyListeners(Fault _fault, SOAPException _soapException) { 96 if (faultListener == null) return; 97 98 SOAPFaultEvent event = new SOAPFaultEvent(_fault, _soapException); 99 100 for (int i = 0; i < faultListener.length; i++) { 101 faultListener[i].fault(event); 102 } 103 } 104 105 } 106 | Popular Tags |