Package net.timewalker.ffmq3.common.session

Examples of net.timewalker.ffmq3.common.session.AbstractQueueBrowser


                else
                if (queueName.equals(FFMQConstants.ADM_REQUEST_QUEUE))
                {
                    // Only the internal admin thread can consume on this queue
                    if (conn.getSecurityContext() != null)
                        throw new FFMQException("Access denied to administration queue "+queueName,"ACCESS_DENIED");
                }
                else
                if (queueName.equals(FFMQConstants.ADM_REPLY_QUEUE))
                {
                    conn.checkPermission(Resource.SERVER, Action.REMOTE_ADMIN);
View Full Code Here


    {
        if (closed)
            return null; // [JMS SPEC]
       
        if (receiving)
          throw new FFMQException("Consumer should not be accessed by more than one thread","ILLEGAL_USAGE");
       
        receiving = true;
        try
        {
          MessageSelector selector = getReceiveSelector();
View Full Code Here

    {
      Privilege privilege = (Privilege)privileges.get(i);
      if (privilege.matches(resourceName, action))
        return;
    }
    throw new FFMQException("Access denied to resource '"+resourceName+"' for action '"+action+"'","ACCESS_DENIED");
  }
View Full Code Here

    public XMLSecurityConnector( Settings settings ) throws JMSException
    {
        String securityDescriptorFilePath = settings.getStringProperty(FFMQServerSettings.SECURITY_CONNECTOR_XML_SECURITY, DEFAULT_SECURITY_FILE);
        File securityDescriptorFile = new File(securityDescriptorFilePath);
        if (!securityDescriptorFile.canRead())
            throw new FFMQException("Cannot access security descriptor file : "+securityDescriptorFile.getAbsolutePath(),"FS_ERROR");
       
        this.descriptor = (XMLSecurityDescriptor)new XMLDescriptorReader().read(securityDescriptorFile, XMLSecurityDescriptorHandler.class);
        this.descriptor.check();
    }
View Full Code Here

    }
   
  private LocalConnection getLocalConnection() throws JMSException
    {
        if (localConnection == null)
            throw new FFMQException("Connection not established","NETWORK_ERROR");
       
        return localConnection;
    }
View Full Code Here

   
    private LocalSession lookupSession( AbstractSessionQuery query ) throws JMSException
    {
        LocalSession localSession = (LocalSession)getLocalConnection().lookupRegisteredSession(query.getSessionId());
        if (localSession == null)
            throw new FFMQException("Invalid session id : "+query.getSessionId(),"NETWORK_ERROR");
        return localSession;
    }
View Full Code Here

    private LocalMessageConsumer lookupConsumer( AbstractConsumerQuery query ) throws JMSException
    {
        LocalSession localSession = lookupSession(query);
        LocalMessageConsumer consumer = (LocalMessageConsumer)localSession.lookupRegisteredConsumer(query.getConsumerId());
        if (consumer == null)
            throw new FFMQException("Invalid consumer id : "+query.getConsumerId(),"NETWORK_ERROR");
        return consumer;
    }
View Full Code Here

    private LocalQueueBrowser lookupBrowser( AbstractQueueBrowserQuery query ) throws JMSException
    {
        LocalSession localSession = lookupSession(query);
        LocalQueueBrowser browser = (LocalQueueBrowser)localSession.lookupRegisteredBrowser(query.getBrowserId());
        if (browser == null)
            throw new FFMQException("Invalid browser id : "+query.getBrowserId(),"NETWORK_ERROR");
        return browser;
    }
View Full Code Here

    private LocalQueueBrowserEnumeration lookupBrowserEnumeration( AbstractQueueBrowserEnumerationQuery query ) throws JMSException
    {
        LocalQueueBrowser browser = lookupBrowser(query);
        LocalQueueBrowserEnumeration browserEnum = (LocalQueueBrowserEnumeration)browser.lookupRegisteredEnumeration(query.getEnumId());
        if (browserEnum == null)
            throw new FFMQException("Invalid browser enumeration id : "+query.getEnumId(),"NETWORK_ERROR");
        return browserEnum;
    }
View Full Code Here

    }
   
    private OpenConnectionResponse processOpenConnection( OpenConnectionQuery query ) throws JMSException
    {
        if (localConnection != null)
            throw new FFMQException("Connection already established","NETWORK_ERROR");
           
        this.localConnection =
            (LocalConnection)engine.openConnection(query.getUserName(),
                                                   query.getPassword(),
                                                   query.getClientID());
View Full Code Here

TOP

Related Classes of net.timewalker.ffmq3.common.session.AbstractQueueBrowser

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.