Package hermes

Examples of hermes.HermesException


        }           
    }
      }

  }catch (ConnectException e) {
      throw new HermesException(e);
  }catch (AdminException e) {
      throw new HermesException(e);
  }

  return rval ;
    }
View Full Code Here


       
      } else {
    Topic topic = (Topic) getHermes().getDestination(dest.getName(), Domain.TOPIC) ;
        
       
    throw new HermesException("Cannot get depth, " + dest.getName() + " is a topic");
      }
     
  }catch (ConnectException e) {
      throw new HermesException(e);
  }catch (AdminException e) {
      throw new HermesException(e);
  }catch (Exception e){
      throw new HermesException(e);
  }
    
    }
View Full Code Here

        messages.add(u.readMessage(dConfig.getClientID(),msgids[k]));
          fin=1;
      }
        }
    }else if(dConfig.getShortName() ==null){
        throw new HermesException(new Exception("ShortName(userID) is null")) ;
    } else{
        throw new HermesException(new Exception("ShortName(userID) is incorrect")) ;
    }
      
      }
  
      return new QueueBrowser() {
        public void close() throws JMSException {
      // TODO Auto-generated method stub    
        }
     
        public Enumeration getEnumeration() throws JMSException {
      return new Enumeration() {
        int i = 0 ;
        public Object nextElement() {
            return messages.get(i++);
 
   
        }
        
        public boolean hasMoreElements() {
            return i <  messages.size() ;
        }
        
          } ;
        }
     
        public String getMessageSelector() throws JMSException {
      // TODO Auto-generated method stub
      // return null;
      return dConfig.getSelector();
        }
     
        public javax.jms.Queue getQueue() throws JMSException {
      // TODO Auto-generated method stub
      return null;
        }
     
    } ;
  } catch (AdminException e) {
      throw new HermesException(e) ;
  } catch (ConnectException e) {
      throw new HermesException(e);
  }
     
    }
View Full Code Here

           
            return rval ;
        }
        catch (BrokerException e)
        {
            throw new HermesException(e);
        }
    }
View Full Code Here

    rval.put("NbMaxMsg", Integer.toString(queue.getNbMaxMsg()));
    rval.put("getPendingMessages", Integer.toString(queue.getPendingMessages()));
    rval.put("getPendingRequests", Integer.toString(queue.getPendingRequests()));
      }
      catch (ConnectException e) {
    throw new HermesException(e);
      }
      catch (AdminException e){
    throw new HermesException(e);
      }
  }else {

      Topic topic = (Topic) getHermes().getSession().createTopic(dConfig.getName());
      try{
    checkConnected();
     
    rval.put("Name", topic.getName());
    rval.put("AdminName", topic.getAdminName());
    rval.put("number of subscription",topic.getSubscriptions());

    String[] ids = topic.getSubscriberIds();
    for(int i=0;i< ids.length;i++){
        User u = new User("user"+i,ids[i]);
        final Subscription[] subs = u.getSubscriptions() ;
        for (int j = 0 ; j < subs.length ; j++) {
      rval.put("subscriber "+j,ids[i]+" : "+subs[j].getName()+"; Durable:"+subs[j].isDurable());
   
        }
    }
 
      }catch (ConnectException e) {
    throw new HermesException(e);
      }catch (AdminException e){
    throw new HermesException(e);
      }
  }
 
  return rval;
    }
View Full Code Here

            u.deleteMessage(dConfig.getClientID(),msgids[k]);
        fin++;
          }
      }
        }else if(dConfig.getShortName() ==null){
      throw new HermesException(new Exception("ShortName(userID) is null")) ;
        } else{
      throw new HermesException(new Exception("ShortName(userID) is incorrect")) ;
        }
       
    }
      }
      return fin;
  }catch(Exception e){
      throw new HermesException(e);
 

    }
View Full Code Here

        }
        fin=1;
          }
      }
        }else{
      throw new HermesException(new Exception("Error when delete")) ;
        }
    }
      }else{
    throw new HermesException(new Exception("Error when delete")) ;
      }
  }catch(Exception e){
      throw new HermesException(e);
 
    }
View Full Code Here

            {
                adminService = adminConnection.getMQAdminService();
            }
            else
            {
                throw new HermesException("FioranoMQ plugin is closed");
            }
        }

        return adminService;
    }
View Full Code Here

       {
          getAdminService().purgeSubscriptionMessages(getHermes().getConnection().getClientID(), dConfig.getClientID()) ;
       }
       else
       {
          throw new HermesException("Domain for " + dConfig.getName() + " is unknown.") ;
       }
      
       return rval ;
   }
View Full Code Here

                               
                                queue.addMessages(session, messages) ;
                            }
                            else
                            {
                                throw new HermesException("destination is not a FileQueue") ;
                            }
                        }
                        else
                        {
                            throw new HermesException("message has no destination") ;
                        }
                    }
                }
                else
                {
                    queue.addMessages(session, messages);
                }
            }
            catch (IOException e)
            {
                throw new HermesException(e);
            }
        }
    }
View Full Code Here

TOP

Related Classes of hermes.HermesException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.