Esempio n. 1
0
 /** {@inheritDoc} */
 public void dispose() throws CacheException {
   if (bus != null) {
     try {
       bus.stop();
     } catch (Exception e) {
       LOG.error("Error occured while closing Manager:", e);
     }
   }
 }
Esempio n. 2
0
  /** @return the {@link Status} of the manager */
  public Status getStatus() {
    if (bus == null) {
      return Status.STATUS_UNINITIALISED;
    }
    if (bus.getChannel() == null) {
      return Status.STATUS_SHUTDOWN;
    }

    return Status.STATUS_ALIVE;
  }
Esempio n. 3
0
  /** {@inheritDoc} */
  public void send(List eventMessages) throws RemoteException {
    if (eventMessages.size() == 1) {
      bus.sendNotification(wrapMessage((JGroupEventMessage) eventMessages.get(0)));
      return;
    }
    ArrayList msg = new ArrayList();

    for (Iterator iter = eventMessages.iterator(); iter.hasNext(); ) {
      JGroupEventMessage m = (JGroupEventMessage) iter.next();
      msg.add(wrapMessage(m));
    }

    try {

      bus.sendNotification(msg);
    } catch (Throwable t) {
      throw new RemoteException(t.getMessage());
    }
  }