Exemplo n.º 1
0
 public void handleNotification(Notification arg0, Object arg1) {
   // check notifications serializable.
   try {
     if (!(arg0.getSource() instanceof ObjectName)) {
       throw new ClassCastException("Doh!");
     }
     Notification copy = OddjobTestHelper.copy(arg0);
     if (!(copy.getSource() instanceof ObjectName)) {
       throw new ClassCastException("Doh!");
     }
   } catch (Exception e) {
     logger.error("Notification Listener failed.", e);
     throw new RuntimeException(e);
   }
   Pair p = new Pair(arg0, arg1);
   notifications.add(p);
 }