org.granite.logging.Logger.info()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(7.7k)|赞(0)|评价(0)|浏览(295)

本文整理了Java中org.granite.logging.Logger.info()方法的一些代码示例,展示了Logger.info()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.info()方法的具体详情如下:
包路径:org.granite.logging.Logger
类名称:Logger
方法名:info

Logger.info介绍

暂无

代码示例

代码示例来源:origin: org.graniteds/granite-client-java-advanced

@Override
public void onResult(ResultEvent event) {
  log.info("Destination %s unsubscribed", destination);
  
  unsubscribing = false;
}

代码示例来源:origin: org.graniteds/granite-client

@Override
public void handleIO(boolean active) {
  log.info(active ? "Starting IO" : "IO completed");
}

代码示例来源:origin: org.graniteds/granite-client-javafx

public void setSessionId(String sessionId) {
  if ((sessionId == null && this.sessionId != null) || (sessionId != null && !sessionId.equals(this.sessionId))) {
    this.sessionId = sessionId;
    log.info("Messaging channel %s set sessionId %s", clientId, sessionId);
  }                
}

代码示例来源:origin: org.graniteds/granite-client-java

public void setSessionId(String sessionId) {
  if ((sessionId == null && this.sessionId != null) || (sessionId != null && !sessionId.equals(this.sessionId))) {
    this.sessionId = sessionId;
    log.info("Messaging channel %s set sessionId %s", clientId, sessionId);
  }                
}

代码示例来源:origin: org.graniteds/granite-server

public void shutdown() {
  log.info("Stopping Gravity Pool...");
  pool.shutdown();
}

代码示例来源:origin: org.graniteds/granite-client

public void setSessionId(String sessionId) {
  if ((sessionId == null && this.sessionId != null) || (sessionId != null && !sessionId.equals(this.sessionId))) {
    this.sessionId = sessionId;
    log.info("Messaging channel sessionId %s", sessionId);
  }                
}

代码示例来源:origin: org.graniteds/granite-client-java-advanced

@Override
public void onResult(ResultEvent event) {
  log.info("Destination %s subscribed sid: %s", destination, consumer.getSubscriptionId());
  
  subscribing = false;
}

代码示例来源:origin: org.graniteds/granite-server

public List<AsyncChannelRunner> shutdownNow() {
    log.info("Stopping Gravity Pool Now...");
    List<Runnable> runnables = pool.shutdownNow();
    List<AsyncChannelRunner> runners = new ArrayList<AsyncChannelRunner>(runnables.size());
    for (Runnable runnable : runnables) {
      AsyncChannelRunner runner = (AsyncChannelRunner)runnable;
      runner.reset();
      runners.add(runner);
    }
    return runners;
  }
}

代码示例来源:origin: org.graniteds/granite-server-ejb

public void initGravity(Gravity gravity) {
  try {
    // Set reference in EJB proxy if found
    InitialContext ic = new InitialContext();
    org.granite.ejb.Gravity gravityEJB = (org.granite.ejb.Gravity)ic.lookup("java:global" + servletContext.getContextPath() + "/org.granite.ejb.Gravity");
    gravityEJB.setGravity(gravity);
    log.info("Registered Gravity EJB");
  }
  catch (Exception e) {
    log.debug(e, "Gravity EJB not found");
  }
}

代码示例来源:origin: org.graniteds/granite-server

private void dumpBytes(String label, byte[] bytes) throws IOException {
  final String encoding = "UTF-8";
  
  ByteArrayOutputStream baos = new ByteArrayOutputStream(512);
  PrintStream ps = new PrintStream(baos, true, encoding);
  
  JMFDumper dumper = new JMFDumper(new ByteArrayInputStream(bytes), jmfSharedContext, ps);
  dumper.dump();
  dumper.close();
  
  log.info("[JMF %s (%d bytes)]\n%s", label.toUpperCase(), bytes.length, new String(baos.toByteArray(), encoding));
}

代码示例来源:origin: org.graniteds/granite-client-java-advanced

@Override
  public void run() {
    log.info("Force session logout");
    logoutState.logout(logoutObserver);
    tryLogout();
  }
});

代码示例来源:origin: org.graniteds/granite-client-javafx

@Override
public ResponseMessageFuture logout(boolean sendLogout, ResponseListener... listeners) {
  log.info("Logging out channel %s", clientId);
  
  ResponseMessageFuture future = super.logout(sendLogout, listeners);
  
  // Force disconnection for streaming transports to ensure next calls are in a new session/authentication context
  disconnect();
  
  return future;
}

代码示例来源:origin: org.graniteds/granite-client-java

@Override
public ResponseMessageFuture logout(boolean sendLogout, ResponseListener... listeners) {
  log.info("Logging out channel %s", clientId);
  
  ResponseMessageFuture future = super.logout(sendLogout, listeners);
  
  // Force disconnection for streaming transports to ensure next calls are in a new session/authentication context
  disconnect();
  
  return future;
}

代码示例来源:origin: org.graniteds/granite-server

public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
  throws IOException, ServletException {
  if (!ContentType.JMF_AMF.mimeType().equals(request.getContentType())) {
    log.info("Ignoring request with content-type: " + request.getContentType());
    chain.doFilter(request, response);
  }
  else {
    DumpRequestWrapper requestWrapper = new DumpRequestWrapper((HttpServletRequest)request);
    DumpResponseWrapper responseWrapper= new DumpResponseWrapper((HttpServletResponse)response);

    chain.doFilter(requestWrapper, responseWrapper);
  }
}

代码示例来源:origin: org.graniteds/granite-server

public static void unregisterMBeans(ServletContext context) {
    String appName = ServletGraniteConfig.getConfig(context).getMBeanContextName();
    try {
      ObjectName name = new ObjectName("org.graniteds:type=GraniteDS,app=" + appName);
      log.info("Unregistering MBean: %s", name);
      MBeanServerLocator.getInstance().unregister(name);
    }
    catch (Exception e) {
      log.error(e, "Could not unregister GraniteDS MBean for context: %s", appName);
    }
  }    
}

代码示例来源:origin: org.graniteds/granite-server

@Override
public void init(ServletConfig config) throws ServletException {
  super.init(config);
  
  GravityServletUtil.init(config);
  
  int scavangeInterval = ServletParams.get(
    config,
    SCAVANGE_INTERVAL,
    Integer.TYPE,
    AbstractAsyncServlet.DEFAULT_SCAVANGE_INTERVAL
  );
  
  log.info("Using scavange interval of: %s", scavangeInterval);
  AbstractAsyncServlet.setScavangeInterval(scavangeInterval);
}

代码示例来源:origin: org.graniteds/granite-client-javafx

protected void scheduleReconnectTimerTask() {
  log.info("Channel %s schedule reconnect", getId());
  
  setPinged(false);
  setAuthenticated(false);
  
  ReconnectTimerTask task = new ReconnectTimerTask();
  
  ReconnectTimerTask previousTask = reconnectTimerTask.getAndSet(task);
  if (previousTask != null)
    previousTask.cancel();
  
  if (reconnectAttempts < reconnectMaxAttempts) {
    reconnectAttempts++;
    schedule(task, reconnectIntervalMillis);
  }
}

代码示例来源:origin: org.graniteds/granite-server

public static void registerMBeans(ServletContext context, ServletGraniteConfig gConfig, ServletServicesConfig sConfig) {
  String appName = ServletGraniteConfig.getConfig(context).getMBeanContextName();
  try {
    ObjectName name = new ObjectName("org.graniteds:type=GraniteDS,app=" + appName);
    log.info("Registering MBean: %s", name);
    OpenMBean mBean = OpenMBean.createMBean(gConfig);
    MBeanServerLocator.getInstance().register(mBean, name);
  }
  catch (Exception e) {
    log.error(e, "Could not register GraniteDS MBean for context: %s", appName);
  }
}

代码示例来源:origin: org.graniteds/granite-client-javafx

@Override
public void connect(final Channel channel, final TransportMessage transportMessage) {
  try {
    log.info("Connecting to websocket %s sessionId %s", channel.getUri(), transportMessage.getSessionId());
    webSocketContainer.connectToServer(new GravityWebSocketEndpoint(channel), new GravityWebSocketEndpointConfig(channel, transportMessage), channel.getUri());
  }
  catch (Exception e) {
    log.error(e, "Could not connect to uri %s", channel.getUri());
    getStatusHandler().handleException(new TransportException("Could not connect to uri " + channel.getUri(), e));
  }
}

代码示例来源:origin: org.graniteds/granite-client-java

@Override
public void connect(final Channel channel, final TransportMessage transportMessage) {
  try {
    log.info("Connecting to websocket %s sessionId %s", channel.getUri(), transportMessage.getSessionId());
    webSocketContainer.connectToServer(new GravityWebSocketEndpoint(channel), new GravityWebSocketEndpointConfig(channel, transportMessage), channel.getUri());
  }
  catch (Exception e) {
    log.error(e, "Could not connect to uri %s", channel.getUri());
    getStatusHandler().handleException(new TransportException("Could not connect to uri " + channel.getUri(), e));
  }
}

相关文章