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


Java SageEvents类代码示例

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


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

示例1: onClientConnected

import sagex.plugin.SageEvents; //导入依赖的package包/类
@SageEvent(value=SageEvents.ClientConnected, background=true)
public void onClientConnected(Map args) {
    //System.out.println("*****GEMSTONE onClientConnected - args '" + args + "' - " + util.LogInfo());
    if (args.containsKey("MACAddress")){
        if (args.get("MACAddress")==null){
            LOG.debug("onClientConnected: MACAddress null so must be a PC client. Client will handle ClientStart. '" + args + "' " + util.LogInfo());
        }else{
            String tClient = args.get("MACAddress").toString();
            if (NonPCClients.contains(tClient)){
                LOG.debug("onClientConnected: client already loaded: '" + tClient + "' IP '" + args.get("IPAddress") + "' Client will handle ClientStart: " + util.LogInfo());
            }else{
                LOG.debug("onClientConnected: new client added: '" + tClient + "' IP '" + args.get("IPAddress") + "' Client will handle ClientStart: " + util.LogInfo());
                NonPCClients.add(args.get("MACAddress").toString());
                //api.clientStart() is called from the STV ApplicationStarted hook to ensure all prerequisites are loaded first
                //api.ClientStart();
            }
        }
    }else{
        LOG.debug("onClientConnected: no MACAddress entry found'" + args + "' " + util.LogInfo());
    }
}
 
开发者ID:jusjoken,项目名称:gemstone2,代码行数:22,代码来源:GemstonePlugin.java

示例2: onClientDisconnected

import sagex.plugin.SageEvents; //导入依赖的package包/类
@SageEvent(value=SageEvents.ClientDisconnected, background=true)
public void onClientDisconnected(Map args) {
    LOG.debug("onClientDisconnected: called '" + args + "' " + util.LogInfo());
    if (args.containsKey("MACAddress")){
        if (args.get("MACAddress")==null){
            LOG.debug("onClientDisconnected: MACAddress null so must be a PC client. Not running server side ClientExit. '" + args + "' " + util.LogInfo());
        }else{
            String tClient = args.get("MACAddress").toString();
            if (NonPCClients.contains(tClient)){
                LOG.debug("onClientDisconnected: client found and removed: '" + tClient + "' IP '" + args.get("IPAddress") + "' " + util.LogInfo());
                NonPCClients.remove(tClient);
                api.ClientExit(tClient);
            }else{
                LOG.debug("onClientDisconnected: client not found: '" + tClient + "' IP '" + args.get("IPAddress") + "' " + util.LogInfo());
            }
        }
    }else{
        LOG.debug("onClientDisconnected: no MACAddress entry found'" + args + "' " + util.LogInfo());
    }
}
 
开发者ID:jusjoken,项目名称:gemstone2,代码行数:21,代码来源:GemstonePlugin.java

示例3: onPluginsLoaded

import sagex.plugin.SageEvents; //导入依赖的package包/类
@SageEvent(value = SageEvents.AllPluginsLoaded, background = true)
public void onPluginsLoaded() {  
    if (OneTimePluginLoadedComplete){
        LOG.debug("onPluginsLoaded: Plugins previously loaded: " + util.LogInfo());
    }else{
        OneTimePluginLoadedComplete = true;
        LOG.debug("onPluginsLoaded: All Plugins Loaded: " + util.LogInfo());
    }
}
 
开发者ID:jusjoken,项目名称:gemstone2,代码行数:10,代码来源:GemstonePlugin.java

示例4: onPlaybackStopped

import sagex.plugin.SageEvents; //导入依赖的package包/类
@PhoenixEvent(SageEvents.PlaybackStopped)
public void onPlaybackStopped(Map args) {
    String ctx = (String) args.get(UICONTEXT_ARG);
    OnlineVideoPlayer player = players.get(ctx);
    log.info("Playback Stopped for " + player);
    if (player != null) {
        setWatched(player.getMediaFile(), (Long) args.get(Duration_ARG), (Long) args.get(MEDIA_TIME_ARG));
        destroyPlayer(ctx);
    }
}
 
开发者ID:stuckless,项目名称:sagetv-phoenix-core,代码行数:11,代码来源:OnlineVideoPlaybackManager.java

示例5: onPlaybackFinished

import sagex.plugin.SageEvents; //导入依赖的package包/类
@PhoenixEvent(SageEvents.PlaybackFinished)
public void onPlaybackFinished(Map args) {
    String ctx = (String) args.get(UICONTEXT_ARG);
    OnlineVideoPlayer player = players.get(ctx);
    log.info("Playback Finished for " + player);
    if (player != null) {
        setWatched(player.getMediaFile(), (Long) args.get(Duration_ARG), (Long) args.get(MEDIA_TIME_ARG));
        destroyPlayer(ctx);
    }
}
 
开发者ID:stuckless,项目名称:sagetv-phoenix-core,代码行数:11,代码来源:OnlineVideoPlaybackManager.java


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