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

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

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

Logger.warn介绍

暂无

代码示例

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

@Override
  public void onWebSocketText(String s) {
    log.warn("Websocket text message not supported");
  }
}

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

@Override
  public void onWebSocketText(String s) {
    log.warn("Websocket text message not supported");
  }
}

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

@Override
protected void releaseAsyncHttpContext(AsyncHttpContext context) {
  // This method shouldn't be called in a WebLogic environment, anyway...
  try {
    if (context != null)
      context.getResponse().getOutputStream().close();
  }
  catch (Exception e) {
    log.warn(e, "Could not release asyncHttpContext for channel: %s", this);
  }
}

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

public void init(FilterConfig config) throws ServletException {
  String dumpDirString = ServletParams.get(config, DUMP_DIR, String.class, null);
  if (dumpDirString != null) {
    File dumpDir = new File(dumpDirString);
    if (!dumpDir.exists() || !dumpDir.isDirectory() || !dumpDir.canWrite())
      log.warn("Ignoring dump directory (is it a writable directory?): %s", dumpDir);
    else
      this.dumpDir = dumpDir;
  }
}

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

@Override
  protected void onTextMessage(CharBuffer buf) throws IOException {
    log.warn("Channel %s unsupported text message", getId());
  }
}

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

public void onPong(WebSocket websocket, byte[] data) {
  log.warn("Channel %s unsupported onPong message", getId());
}

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

@Override
public void onWebSocketText(String s) {
  log.warn("Channel %s unsupported text message", getId());
}

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

protected void setMaxBinaryMessageBufferSize(int maxBinaryMessageBufferSize) {
  if (maxBinaryMessageBufferSize < 512)
    log.warn("Trying to set WebSocket maxBinaryMessageBufferSize too low: %d (ignored)", maxBinaryMessageBufferSize);
  else {
    log.debug("Setting MaxBinaryMessageBufferSize to: %d", maxBinaryMessageBufferSize);
    this.maxBinaryMessageBufferSize = maxBinaryMessageBufferSize;
  }
}

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

public void onFragment(WebSocket websocket, String message, boolean isLast) {
  log.warn("Channel %s unsupported onFragment text message", getId());
}

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

public void onMessage(WebSocket websocket, String message) {
  log.warn("Channel %s unsupported text message", getId());
}

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

protected MatchingMethod resolveMatchingMethod(List<MatchingMethod> methods, Class<?> serviceClass) {
  // Prefer methods of interfaces/classes marked with @RemoteDestination
  for (MatchingMethod m : methods) {
    if (m.serviceMethod.getDeclaringClass().isAnnotationPresent(RemoteDestination.class))
      return m;
  }
  
  // Then prefer method declared by the serviceClass (with EJBs, we have always 2 methods, one in the interface,
  // the other in the proxy, and the @RemoteDestination annotation cannot be find on the proxy class even
  // it is present on the original class).
  List<MatchingMethod> serviceClassMethods = new ArrayList<MatchingMethod>();
  for (MatchingMethod m : methods) {
    if (m.serviceMethod.getDeclaringClass().equals(serviceClass))
      serviceClassMethods.add(m);
  }
  if (serviceClassMethods.size() == 1)
    return serviceClassMethods.get(0);
  
  log.warn("Ambiguous method match for " + methods.get(0).serviceMethod.getName() + ", selecting first found " + methods.get(0).serviceMethod);        
  return methods.get(0);
}

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

public void onFragment(WebSocket websocket, byte[] data, boolean isLast) {
  log.warn("Channel %s unsupported onFragment binary message", getId());
}

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

public void onPing(WebSocket websocket, byte[] data) {
  log.warn("Channel %s unsupported onPing message", getId());
}

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

@Override
public void stop() throws ServiceException {
  super.stop();
  for (JMSClient jmsClient : jmsClients.values()) {
    try {
      jmsClient.close();
    }
    catch (Exception e) {
      log.warn(e, "Could not close JMSClient: %s", jmsClient);
    }
  }
  jmsClients.clear();
}

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

@Override
public boolean removeConsumer(Consumer consumer) {
  String subscriptionId = consumer.getSubscriptionId();
  if (subscriptionId == null) {
    for (String sid : consumersMap.keySet()) {
      if (consumersMap.get(sid) == consumer) {
        subscriptionId = sid;
        break;
      }
    }
  }
  if (subscriptionId == null) {
    log.warn("Trying to remove unexisting consumer for destination %s", consumer.getDestination());
    return false;
  }
  return consumersMap.remove(subscriptionId) != null;
}

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

@Override
public boolean removeConsumer(Consumer consumer) {
  String subscriptionId = consumer.getSubscriptionId();
  if (subscriptionId == null) {
    for (String sid : consumersMap.keySet()) {
      if (consumersMap.get(sid) == consumer) {
        subscriptionId = sid;
        break;
      }
    }
  }
  if (subscriptionId == null) {
    log.warn("Trying to remove unexisting consumer for destination %s", consumer.getDestination());
    return false;
  }
  return consumersMap.remove(subscriptionId) != null;
}

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

/**
 * Initialize the lazy property for the passed in entity.
 * @param entity the entity that has a lazy relationship
 * @param propertyNames the properties of the entity that has been marked lazy
 * @return the lazy collection
 */
public Object lazyInitialize(Object entity, String[] propertyNames)  {
  TidePersistenceManager pm = getTidePersistenceManager(true);
  if (pm == null) {
    log.warn("No persistence manager found: lazy initialization ignored for " + entity);
    return entity;
  }
  
  return pm.attachEntity(entity, propertyNames);
}

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

@Override
protected void releaseAsyncHttpContext(AsyncHttpContext context) {
  try {
    if (context != null && context.getObject() != null)
      ((AsyncContext)context.getObject()).complete();
  }
  catch (Exception e) {
    log.warn(e, "Could not release asyncContext for channel: %s", this);
  }
}

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

@Override
protected void releaseAsyncHttpContext(AsyncHttpContext context) {
  try {
    if (context != null && context.getObject() != null)
      ((CometEvent)context.getObject()).close();
  }
  catch (Exception e) {
    log.warn(e, "Could not release event for channel: %s", this);
  }
}

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

@AroundInvoke
  public Object doAround(InvocationContext invocation) throws Exception {
    Object result = invocation.proceed();
    
    Bean<?> bean = instrumentedBeans.getBean(invocation.getTarget().getClass());
    if (bean == null)
      log.warn("Instrumented Bean not found for class " + invocation.getTarget().getClass());
    else {
      String componentName = bean.getName();
      
      ScopedContextResult scr = new ScopedContextResult(componentName, null, invocation.getTarget());
      scr.setComponentClassName(bean.getBeanClass().getName());
      tideContext.addResultEval(scr);
    }
    
    return result;
  }
}

相关文章