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


Java GrizzlyFuture类代码示例

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


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

示例1: shutDown

import org.glassfish.grizzly.GrizzlyFuture; //导入依赖的package包/类
/**
 * Gracefully stop REST service.
 */
@Override
protected void shutDown() throws Exception {
    long traceId = LoggerHelpers.traceEnterWithContext(log, this.objectId, "shutDown");
    try {
        log.info("Stopping REST server listening on port: {}", this.restServerConfig.getPort());
        final GrizzlyFuture<HttpServer> shutdown = httpServer.shutdown(30, TimeUnit.SECONDS);
        log.info("Awaiting termination of REST server");
        shutdown.get();
        log.info("REST server terminated");
    } finally {
        LoggerHelpers.traceLeave(log, this.objectId, "shutDown", traceId);
    }
}
 
开发者ID:pravega,项目名称:pravega,代码行数:17,代码来源:RESTServer.java

示例2: shutdownAndAwait

import org.glassfish.grizzly.GrizzlyFuture; //导入依赖的package包/类
public void shutdownAndAwait(final long timeoutMillis) {
    try {
        logger.info("Shutting down REST server");
        if (httpServer != null) {
            final GrizzlyFuture<HttpServer> future = httpServer.shutdown(timeoutMillis, TimeUnit.MILLISECONDS);
            future.get();
        }
        logger.info("Shutdown of REST server complete");
    } catch (final Exception e) {
        throw new IllegalStateException(e);
    }
}
 
开发者ID:travel-cloud,项目名称:Cheddar,代码行数:13,代码来源:RestServer.java

示例3: send

import org.glassfish.grizzly.GrizzlyFuture; //导入依赖的package包/类
@Override
public GrizzlyFuture<DataFrame> send(String data) {
    sentData.add(data);
    return new SafeFutureImpl<>();
}
 
开发者ID:shilongdai,项目名称:LSChatServer,代码行数:6,代码来源:MockWebSocket.java

示例4: sendPing

import org.glassfish.grizzly.GrizzlyFuture; //导入依赖的package包/类
@Override
public GrizzlyFuture<DataFrame> sendPing(byte[] data) {
    throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
 
开发者ID:shilongdai,项目名称:LSChatServer,代码行数:5,代码来源:MockWebSocket.java

示例5: sendPong

import org.glassfish.grizzly.GrizzlyFuture; //导入依赖的package包/类
@Override
public GrizzlyFuture<DataFrame> sendPong(byte[] data) {
    throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
 
开发者ID:shilongdai,项目名称:LSChatServer,代码行数:5,代码来源:MockWebSocket.java

示例6: stream

import org.glassfish.grizzly.GrizzlyFuture; //导入依赖的package包/类
@Override
public GrizzlyFuture<DataFrame> stream(boolean arg0, String arg1) {
    throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
 
开发者ID:shilongdai,项目名称:LSChatServer,代码行数:5,代码来源:MockWebSocket.java


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