当前位置: 首页>>代码示例>>Java>>正文


Java StopContext类代码示例

本文整理汇总了Java中org.jboss.msc.service.StopContext的典型用法代码示例。如果您正苦于以下问题:Java StopContext类的具体用法?Java StopContext怎么用?Java StopContext使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


StopContext类属于org.jboss.msc.service包,在下文中一共展示了StopContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: stop

import org.jboss.msc.service.StopContext; //导入依赖的package包/类
@Override
public void stop(StopContext context) {
   	// Stop socket transport(s)
   	if (this.socketListener != null) {
   		this.socketListener.stop();
   		this.socketListener = null;
   	}
   	this.sessionService.stop();
   	
   	if (this.socketConfig != null) {
   		if (socketConfig.getProtocol() == WireProtocol.teiid) {
   	    	LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50039, this.transportName, this.address.getHostName(), String.valueOf(this.address.getPort()))); 
   		}
   		else if (socketConfig.getProtocol() == WireProtocol.pg) {
   	    	LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50040, this.address.getHostName(), String.valueOf(this.address.getPort())));
   		}
   	}
   	else {
   		LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50041, LocalServerConnection.jndiNameForRuntime(transportName))); 
   	}
}
 
开发者ID:kenweezy,项目名称:teiid,代码行数:22,代码来源:TransportService.java

示例2: stop

import org.jboss.msc.service.StopContext; //导入依赖的package包/类
@Override
public void stop(StopContext context) {
	ServiceController<?> switchSvc = context.getController().getServiceContainer().getService(TeiidServiceNames.vdbSwitchServiceName(vdb.getName(), vdb.getVersion()));
       if (switchSvc != null) {
           switchSvc.setMode(ServiceController.Mode.REMOVE);
       }
               
	// stop object replication
	if (this.objectReplicatorInjector.getValue() != null) {
		GlobalTableStore gts = vdb.getAttachment(GlobalTableStore.class);
		this.objectReplicatorInjector.getValue().stop(gts);
	}		
	getVDBRepository().removeVDB(this.vdb.getName(), this.vdb.getVersion());
	getVDBRepository().removeListener(this.vdbListener);
	getVDBRepository().removeListener(this.restEasyListener);
	final ServiceController<?> controller = context.getController().getServiceContainer().getService(TeiidServiceNames.vdbFinishedServiceName(vdb.getName(), vdb.getVersion()));
       if (controller != null) {
           controller.setMode(ServiceController.Mode.REMOVE);
       }	        
	LogManager.logInfo(LogConstants.CTX_RUNTIME, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50026, this.vdb));
}
 
开发者ID:kenweezy,项目名称:teiid,代码行数:22,代码来源:VDBService.java

示例3: stop

import org.jboss.msc.service.StopContext; //导入依赖的package包/类
@Override
public synchronized void stop(final StopContext context) {

    if (executorService != null) {
        context.asynchronous();
        Thread executorShutdown = new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    executorService.shutdown();
                } finally {
                    executorService = null;
                    context.complete();
                }
            }
        }, "ServerExecutorService Shutdown Thread");
        executorShutdown.start();
    }
}
 
开发者ID:jbosschina,项目名称:wildfly-dev-cookbook,代码行数:20,代码来源:ServerExecutorService.java

示例4: stop

import org.jboss.msc.service.StopContext; //导入依赖的package包/类
@Override
public synchronized void stop(final StopContext stopContext) {
    final ExecutorService executorService = executorInjector.getValue();
    final Runnable task = new Runnable() {
        @Override
        public void run() {
            try {
                responseAttachmentSupport.shutdown();
            } finally {
                StreamUtils.safeClose(client);
                client = null;
                stopContext.complete();
            }
        }
    };
    try {
        executorService.execute(task);
    } catch (RejectedExecutionException e) {
        task.run();
    } finally {
        stopContext.asynchronous();
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:24,代码来源:HostControllerConnectionService.java

示例5: stop

import org.jboss.msc.service.StopContext; //导入依赖的package包/类
@Override
public void stop(final StopContext context) {
    if (!blockStart) {
        try {
            synchronized (waitObject) {
                log.info("BlockService blocking in stop");
                waitObject.wait(blockTime);
            }
            context.complete();
        } catch (InterruptedException e) {
            log.info("BlockService interrupted");
            Thread.currentThread().interrupt();
            throw new RuntimeException(e);
        }
    } else {
        synchronized (waitObject) {
            log.info("BlockService Stopping");
            waitObject.notifyAll();
        }
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:22,代码来源:BlockerExtension.java

示例6: stop

import org.jboss.msc.service.StopContext; //导入依赖的package包/类
@Override
public synchronized void stop(final StopContext context) {
    Runnable r = new Runnable() {
        @Override
        public void run() {
            try {
                scheduledExecutorService.shutdown();
            } finally {
                scheduledExecutorService = null;
                context.complete();
            }
        }
    };
    try {
        executorInjector.getValue().execute(r);
    } catch (RejectedExecutionException e) {
        r.run();
    } finally {
        context.asynchronous();
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:22,代码来源:ServerService.java

示例7: stop

import org.jboss.msc.service.StopContext; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public synchronized void stop(final StopContext context) {
    Runnable r = new Runnable() {
        @Override
        public void run() {
            try {
                StreamUtils.safeClose(connection);
                responseAttachmentSupport.shutdown();
            } finally {
                context.complete();
            }
        }
    };
    try {
        executor.execute(r);
    } catch (RejectedExecutionException e) {
        r.run();
    } finally {
        context.asynchronous();
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:23,代码来源:RemoteDomainConnectionService.java

示例8: stop

import org.jboss.msc.service.StopContext; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public synchronized void stop(final StopContext context) {
    final Runnable task = new Runnable() {
        @Override
        public void run() {
            try {
                if (isMasterDomainController && (discoveryOptions != null)) {
                    for (DiscoveryOption discoveryOption : discoveryOptions) {
                        discoveryOption.cleanUp();
                    }
                }
            } finally {
                context.complete();
            }
        }
    };
    try {
        executorService.getValue().execute(task);
    } catch (RejectedExecutionException e) {
        task.run();
    } finally {
        context.asynchronous();
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:26,代码来源:DiscoveryService.java

示例9: stop

import org.jboss.msc.service.StopContext; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public synchronized void stop(final StopContext stopContext) {
    final ExecutorService executorService = executor.getValue();
    final Runnable task = new Runnable() {
        @Override
        public void run() {
            try {
                responseAttachmentSupport.shutdown();
                // Shut down new requests to the client request executor,
                // but don't mess with currently running tasks
                clientRequestExecutor.shutdown();
            } finally {
                stopContext.complete();
            }
        }
    };
    try {
        executorService.execute(task);
    } catch (RejectedExecutionException e) {
        task.run();
    } finally {
        stopContext.asynchronous();
    }

}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:27,代码来源:AbstractModelControllerOperationHandlerFactoryService.java

示例10: stop

import org.jboss.msc.service.StopContext; //导入依赖的package包/类
@Override
public synchronized void stop(final StopContext context) {
    final String deploymentName = context.getController().getName().getSimpleName();
    final String managementName = deploymentUnit.getAttachment(Attachments.MANAGEMENT_NAME);
    if (deploymentUnit.getParent()==null) {
        ServerLogger.DEPLOYMENT_LOGGER.stoppedDeployment(managementName, deploymentName, (int) (context.getElapsedTime() / 1000000L));
    } else {
        ServerLogger.DEPLOYMENT_LOGGER.stoppedSubDeployment(deploymentName, (int) (context.getElapsedTime() / 1000000L));
    }
    // Retain any attached builder across restarts
    this.phaseBuilder = this.deploymentUnit.getAttachment(Attachments.DEPLOYMENT_UNIT_PHASE_BUILDER);
    //clear up all attachments
    for (AttachmentKey<?> key : this.getDeploymentUnitAttachmentKeys()) {
        deploymentUnit.removeAttachment(key);
    }
    deploymentUnit = null;
    monitor.removeController(context.getController());
    monitor = null;
    DeploymentResourceSupport.cleanup(resource);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:21,代码来源:AbstractDeploymentUnitService.java

示例11: stop

import org.jboss.msc.service.StopContext; //导入依赖的package包/类
@Override
public void stop(StopContext stopContext) {
    try {
        neo4jSubsystemServiceInjectedValue.getValue().removeModuleNameFromJndi(configurationBuilder.getJNDIName());
        neo4jSubsystemServiceInjectedValue.getValue().removeModuleNameFromProfile(configurationBuilder.getDescription());

        neo4jInteraction.driverClose(driver);
        driver = null;
    } catch (Throwable throwable) {
        ROOT_LOGGER.driverFailedToStop(throwable);
    }
}
 
开发者ID:wildfly,项目名称:wildfly-nosql,代码行数:13,代码来源:Neo4jClientConnectionService.java

示例12: stop

import org.jboss.msc.service.StopContext; //导入依赖的package包/类
@Override
public void stop(StopContext stopContext) {
    orientSubsystemServiceInjectedValue.getValue().removeModuleNameFromJndi(configuration.getJndiName());
    orientSubsystemServiceInjectedValue.getValue().removeModuleNameFromProfile(configuration.getProfileName());
    try {
        orientInteraction.close(databasePool);
    } catch (Throwable throwable) {
        ROOT_LOGGER.driverFailedToStop(throwable);
    } finally {
        databasePool = null;
    }
}
 
开发者ID:wildfly,项目名称:wildfly-nosql,代码行数:13,代码来源:OrientClientConnectionsService.java

示例13: stop

import org.jboss.msc.service.StopContext; //导入依赖的package包/类
@Override
public void stop(StopContext stopContext) {
    try {
        cassandraSubsystemServiceInjectedValue.getValue().removeModuleNameFromJndi(configurationBuilder.getJNDIName());
        cassandraSubsystemServiceInjectedValue.getValue().removeModuleNameFromProfile(configurationBuilder.getDescription());
        if (session != null) {
            cassandraInteraction.sessionClose(session);
            session = null;
        }
        cassandraInteraction.clusterClose(cluster);
        cluster = null;
    } catch (Throwable throwable) {
        ROOT_LOGGER.driverFailedToStop(throwable);
    }
}
 
开发者ID:wildfly,项目名称:wildfly-nosql,代码行数:16,代码来源:CassandraClientConnectionsService.java

示例14: stop

import org.jboss.msc.service.StopContext; //导入依赖的package包/类
@Override
public void stop(StopContext stopContext) {
    try {
        mongoSubsystemServiceInjectedValue.getValue().removeModuleNameFromJndi(configurationBuilder.getJNDIName());
        mongoSubsystemServiceInjectedValue.getValue().removeModuleNameFromProfile(configurationBuilder.getDescription());
        mongoInteraction.close();
    } catch (Throwable throwable) {
        ROOT_LOGGER.driverFailedToStop(throwable);
    }
    client = null;
}
 
开发者ID:wildfly,项目名称:wildfly-nosql,代码行数:12,代码来源:MongoClientConnectionsService.java

示例15: stop

import org.jboss.msc.service.StopContext; //导入依赖的package包/类
@Override
public void stop(StopContext stopContext) {
    this.thread.interrupt();

    this.watchers.values().forEach(e -> {
        try {
            e.stop();
        } catch (Exception e1) {
            e1.printStackTrace();
        }
    });
}
 
开发者ID:wildfly-swarm-archive,项目名称:wildfly-swarm-topology-consul,代码行数:13,代码来源:CatalogWatcher.java


注:本文中的org.jboss.msc.service.StopContext类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。