Package org.drools.time

Examples of org.drools.time.SchedulerService


        UuidJobHandle jobhandle = new UuidJobHandle();
        // Get the Service Configuration from the Data field
        SchedulerServiceConfiguration conf = (SchedulerServiceConfiguration) schedulerGsd.getData();
        // If the GSD doesn't have conf and it doesn't have addresses, we can use the local SchedulerService
        if ( conf == null && schedulerGsd.getAddresses().get( "socket" ) == null ) {
            SchedulerService sched = null;
            try {
                // We use the ID that contains the type of the service that we are using -> refactor this and include serviceType in GSD
                sched = grid.get( (Class<SchedulerService>) Class.forName( schedulerGsd.getServiceInterface().getCanonicalName() ) );
            } catch ( ClassNotFoundException ex ) {
                Logger.getLogger( SchedulerClient.class.getName() ).log( Level.SEVERE,
                                                                         null,
                                                                         ex );
            }
            return sched.scheduleJob( job,
                                      ctx,
                                      trigger );
        }
        // If we have a service configuration
        int redundancy = 1;
View Full Code Here


    public int getPort() {
        return port;
    }

    public void configureService(Grid grid) {
        SchedulerService sched = grid.get( SchedulerService.class );

        if ( port != -1 ) {
            CoreServicesLookupImpl coreServicesWP = (CoreServicesLookupImpl) grid.get( CoreServicesLookup.class );

            GridServiceDescriptionImpl gsd = (GridServiceDescriptionImpl) coreServicesWP.lookup( SchedulerService.class );
View Full Code Here

        UuidJobHandle jobhandle = new UuidJobHandle();
        // Get the Service Configuration from the Data field
        SchedulerServiceConfiguration conf = (SchedulerServiceConfiguration) schedulerGsd.getData();
        // If the GSD doesn't have conf and it doesn't have addresses, we can use the local SchedulerService
        if ( conf == null && schedulerGsd.getAddresses().get( "socket" ) == null ) {
            SchedulerService sched = null;
            try {
                // We use the ID that contains the type of the service that we are using -> refactor this and include serviceType in GSD
                sched = grid.get( (Class<SchedulerService>) Class.forName( schedulerGsd.getServiceInterface().getCanonicalName() ) );
            } catch ( ClassNotFoundException ex ) {
                Logger.getLogger( SchedulerClient.class.getName() ).log( Level.SEVERE,
                                                                         null,
                                                                         ex );
            }
            return sched.scheduleJob( job,
                                      ctx,
                                      trigger );
        }
        // If we have a service configuration
        int redundancy = 1;
View Full Code Here

        UuidJobHandle jobhandle = new UuidJobHandle();
        // Get the Service Configuration from the Data field
        SchedulerServiceConfiguration conf = (SchedulerServiceConfiguration) schedulerGsd.getData();
        // If the GSD doesn't have conf and it doesn't have addresses, we can use the local SchedulerService
        if ( conf == null && schedulerGsd.getAddresses().get( "socket" ) == null ) {
            SchedulerService sched = null;
            try {
                // We use the ID that contains the type of the service that we are using -> refactor this and include serviceType in GSD
                sched = grid.get( (Class<SchedulerService>) Class.forName( schedulerGsd.getServiceInterface().getCanonicalName() ) );
            } catch ( ClassNotFoundException ex ) {
                Logger.getLogger( SchedulerClient.class.getName() ).log( Level.SEVERE,
                                                                         null,
                                                                         ex );
            }
            return sched.scheduleJob( job,
                                      ctx,
                                      trigger );
        }
        // If we have a service configuration
        int redundancy = 1;
View Full Code Here

    public int getPort() {
        return port;
    }

    public void configureService(Grid grid) {
        SchedulerService sched = grid.get( SchedulerService.class );

        if ( port != -1 ) {
            CoreServicesLookupImpl coreServicesWP = (CoreServicesLookupImpl) grid.get( CoreServicesLookup.class );

            GridServiceDescriptionImpl gsd = (GridServiceDescriptionImpl) coreServicesWP.lookup( SchedulerService.class );
View Full Code Here

    public void configureService(Grid grid) {
        CoreServicesLookupImpl coreServices = (CoreServicesLookupImpl) grid.get( CoreServicesLookup.class );

        GridServiceDescriptionImpl gsd = (GridServiceDescriptionImpl) coreServices.lookup( SchedulerService.class );

        SchedulerService scheduler = new SchedulerClient( grid,
                                                          gsd);
        ((GridImpl) grid).addService( SchedulerService.class,
                                      scheduler );

    }
View Full Code Here

TOP

Related Classes of org.drools.time.SchedulerService

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.