org.apache.sshd.common.util.buffer.Buffer.isValidMessageStructure()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(116)

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

Buffer.isValidMessageStructure介绍

暂无

代码示例

代码示例来源:origin: org.apache.sshd/sshd-common

public boolean isValidMessageStructure(Class<?>... fieldTypes) {
  return isValidMessageStructure(GenericUtils.isEmpty(fieldTypes) ? Collections.emptyList() : Arrays.asList(fieldTypes));
}

代码示例来源:origin: org.apache.sshd/sshd-osgi

public boolean isValidMessageStructure(Class<?>... fieldTypes) {
  return isValidMessageStructure(GenericUtils.isEmpty(fieldTypes) ? Collections.emptyList() : Arrays.asList(fieldTypes));
}

代码示例来源:origin: org.apache.sshd/sshd-core

protected void handleIgnore(Buffer buffer) throws Exception {
  // malformed ignore message - ignore (even though we don't have to, but we can be tolerant in this case)
  if (!buffer.isValidMessageStructure(byte[].class)) {
    if (log.isTraceEnabled()) {
      log.trace("handleIgnore({}) ignore malformed message", this);
    }
    return;
  }
  resetIdleTimeout();
  ReservedSessionMessagesHandler handler = resolveReservedSessionMessagesHandler();
  handler.handleIgnoreMessage(this, buffer);
}

代码示例来源:origin: org.apache.sshd/sshd-core

protected void handleDebug(Buffer buffer) throws Exception {
  // malformed ignore message - ignore (even though we don't have to, but we can be tolerant in this case)
  if (!buffer.isValidMessageStructure(boolean.class, String.class, String.class)) {
    if (log.isTraceEnabled()) {
      log.trace("handleDebug({}) ignore malformed message", this);
    }
    return;
  }
  resetIdleTimeout();
  ReservedSessionMessagesHandler handler = resolveReservedSessionMessagesHandler();
  handler.handleDebugMessage(this, buffer);
}

代码示例来源:origin: org.apache.sshd/sshd-core

protected void handleUnimplemented(Buffer buffer) throws Exception {
  if (!buffer.isValidMessageStructure(int.class)) {
    if (log.isTraceEnabled()) {
      log.trace("handleUnimplemented({}) ignore malformed message", this);
    }
    return;
  }
  resetIdleTimeout();
  ReservedSessionMessagesHandler handler = resolveReservedSessionMessagesHandler();
  handler.handleUnimplementedMessage(this, buffer);
}

代码示例来源:origin: org.apache.sshd/sshd-osgi

protected void handleIgnore(Buffer buffer) throws Exception {
  // malformed ignore message - ignore (even though we don't have to, but we can be tolerant in this case)
  if (!buffer.isValidMessageStructure(byte[].class)) {
    if (log.isTraceEnabled()) {
      log.trace("handleIgnore({}) ignore malformed message", this);
    }
    return;
  }
  resetIdleTimeout();
  ReservedSessionMessagesHandler handler = resolveReservedSessionMessagesHandler();
  handler.handleIgnoreMessage(this, buffer);
}

代码示例来源:origin: org.apache.sshd/sshd-osgi

protected void handleUnimplemented(Buffer buffer) throws Exception {
  if (!buffer.isValidMessageStructure(int.class)) {
    if (log.isTraceEnabled()) {
      log.trace("handleUnimplemented({}) ignore malformed message", this);
    }
    return;
  }
  resetIdleTimeout();
  ReservedSessionMessagesHandler handler = resolveReservedSessionMessagesHandler();
  handler.handleUnimplementedMessage(this, SshConstants.SSH_MSG_UNIMPLEMENTED, buffer);
}

代码示例来源:origin: org.apache.sshd/sshd-osgi

protected void handleDebug(Buffer buffer) throws Exception {
  // malformed ignore message - ignore (even though we don't have to, but we can be tolerant in this case)
  if (!buffer.isValidMessageStructure(boolean.class, String.class, String.class)) {
    if (log.isTraceEnabled()) {
      log.trace("handleDebug({}) ignore malformed message", this);
    }
    return;
  }
  resetIdleTimeout();
  ReservedSessionMessagesHandler handler = resolveReservedSessionMessagesHandler();
  handler.handleDebugMessage(this, buffer);
}

相关文章