Пример #1
0
 private String getTabTitle(MemoryLogModel memoryLogModel) {
   SessionID sessionId = memoryLogModel.getSessionId();
   if (sessionId == null) {
     return NO_SESSION_ID;
   } else {
     return sessionId.toString();
   }
 }
Пример #2
0
 private String getLogSuffix(SessionID sessionID, IoSession protocolSession) {
   String suffix = ":";
   if (sessionID != null) {
     suffix += "sessionID=" + sessionID.toString() + ";";
   }
   if (protocolSession != null) {
     suffix += "address=" + protocolSession.getRemoteAddress();
   }
   return suffix;
 }
Пример #3
0
    @Override
    public int hashCode() {
      final int prime = 31;
      int result = 1;
      result = prime * result + (eventCategory == null ? 0 : eventCategory.hashCode());
      result = prime * result + (sessionID == null ? 0 : sessionID.hashCode());
      result = prime * result + (message == null ? 1231 : 1237);

      return result;
    }
Пример #4
0
    public boolean equals(Object object) {
      if (object == null) {
        return false;
      }
      if (object instanceof Pair == false) {
        return false;
      }
      Pair pair = (Pair) object;

      return clOrdID.equals(pair.clOrdID) && sessionID.equals(pair.sessionID);
    }
Пример #5
0
 public Pair(ClOrdID clOrdID, SessionID sessionID) {
   this.clOrdID = clOrdID;
   this.sessionID = sessionID;
   hashCode = ("C:" + clOrdID.toString() + "S:" + sessionID.toString()).hashCode();
 }