Package org.torquebox.messaging.tasks

Examples of org.torquebox.messaging.tasks.TaskMetaData


        @SuppressWarnings("rawtypes")
        static List<TaskMetaData> parseTasks( Map<String, Map>tasks, List<? extends TaskMetaData> existingTasks) {
            List<TaskMetaData> result = new ArrayList<TaskMetaData>();

            for (String rubyClassName :  tasks.keySet()) {
                TaskMetaData task = existingTaskMetaData( rubyClassName, existingTasks );

                Map options = tasks.get( rubyClassName );

                if (task == null) {
                    task = new TaskMetaData();
                    task.setRubyClassName( rubyClassName );
                    result.add( task );
                }

                if (options != null) {
                    task.setConcurrency( (Integer)options.get( "concurrency") );
                    task.setDurable( (Boolean)options.get( "durable" ) );
                }
            }
           
            return result;
        }
View Full Code Here


    }

    @Override
    protected void deploy(DeploymentUnit unit, VirtualFile file, String parentPath, String relativePath) throws DeploymentUnitProcessingException {
        String rubyClassName = StringUtils.pathToClassName( relativePath, ".rb" );
        TaskMetaData taskMetaData = existingTaskMetaData( unit, rubyClassName );

        if (taskMetaData == null) {
            taskMetaData = new TaskMetaData();
            unit.addToAttachmentList( TaskMetaData.ATTACHMENTS_KEY, taskMetaData );
        }
       
        String simpleLocation = parentPath + relativePath.substring( 0, relativePath.length() - 3 );

        taskMetaData.setLocation( simpleLocation );
        taskMetaData.setRubyClassName( rubyClassName );
    }
View Full Code Here

            return;
        }
        if (!unit.hasAttachment( RubyAppMetaData.ATTACHMENT_KEY )) {
            return;
        }
        TaskMetaData task = new TaskMetaData();

        task.setRubyClassName( "TorqueBox::Messaging::BackgroundableProcessor" );
        task.setLocation( "torquebox/messaging/backgroundable_processor" );
        task.setQueueSuffix( "torquebox_backgroundable" );
        task.setSimpleName( "Backgroundable" );
        task.setXAEnabled( false );

        unit.addToAttachmentList( TaskMetaData.ATTACHMENTS_KEY, task );
    }
View Full Code Here

TOP

Related Classes of org.torquebox.messaging.tasks.TaskMetaData

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.