code: private static String resolveIdentity(SocketAddress address, IoSessionEx session) {
          if (address instanceof ResourceAddress) {
              Subject subject = session.getSubject();
              if (subject == null) {
                  subject = new Subject();
              }
              return resolveIdentity((ResourceAddress) address, subject);
          }
          return null;
      }
docs: Method performing identity resolution - attempts to extract a subject from the current
  IoSessionEx session
  @param address
  @param session
  @return