Esempio n. 1
0
 /**
  * Constructs a new <code>ProcessorStatusEvent</code>.
  *
  * @param processor the processor which caused the event, must not be <code>null</code>
  * @param oldStatus the old processor status
  */
 public ProcessorStatusEvent(Processor processor, int oldStatus) {
   super(processor);
   Guardian.assertNotNull("processor", processor);
   _request = processor.getRequest();
   _oldStatus = oldStatus;
   _newStatus = processor.getCurrentStatus();
   _exception = null; // processor.getLastException();
 }
Esempio n. 2
0
 protected void unregister(Processor<S> processor) {
   if (getProtocol().getDomain() != null) {
     synchronized (this) {
       try {
         Request r = processor.getRequest();
         if (r == null) {
           // Probably an UpgradeProcessor
           return;
         }
         RequestInfo rp = r.getRequestProcessor();
         rp.setGlobalProcessor(null);
         ObjectName rpName = rp.getRpName();
         if (getLog().isDebugEnabled()) {
           getLog().debug("Unregister " + rpName);
         }
         Registry.getRegistry(null, null).unregisterComponent(rpName);
         rp.setRpName(null);
       } catch (Exception e) {
         getLog().warn("Error unregistering request", e);
       }
     }
   }
 }