code: private static String getHandlerID(int transferMode,
  				       int transferType,
  				       int type) {
  	String id = "";
  
  	switch (transferMode) {
  	case Session.MODE_STREAM:
  	    id += "S-"; break;
  	case GridFTPSession.MODE_EBLOCK:
  	    id += "E-"; break;
  	default:
  	    throw new IllegalArgumentException("Mode not supported: " +
  					       transferMode);
  	}
  
  	switch (transferType) {
  	case Session.TYPE_IMAGE:
  	    id += "I-"; break;
  	case Session.TYPE_ASCII:
  	    id += "A-"; break;
  	default:
  	    throw new IllegalArgumentException("Type not supported: " +
  					       transferType);
  	}
  
  	switch (type) {
  	case SOURCE:
  	    id += "R"; break;
  	case SINK:
  	    id += "W"; break;
  	default:
  	    throw new IllegalArgumentException("Type not supported: " +
  					       type);
  	}
  
  	if (id.equals("")) {
  	    return null;
  	}
  	return id;
      }
docs: mode/transfer types